Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8676 closed defect (fixed)

[patch] [ccla] ComboBox: Accessibility bug: no "title" attribute for the input element

Reported by: shansw Owned by: Becky Gibson
Priority: high Milestone: 1.4
Component: Accessibility Version: 1.2.3
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

The <input> element in dijit.form.comboBox can't be set a "title" attribute or associated with a <label> element. It's not compliant to the web accessibility checklist 4.0. dijit.form.comboBox should provide an approach for user to set the "title" attribute" of the <input> element.

Attachments (1)

8676.patch (8.1 KB) - added by Becky Gibson 10 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by bill

Component: GeneralDijit - LnF
Owner: anonymous deleted
Summary: Accessibility bug for dijit.form.comboBox: no "title" attribute for the input elementComboBox: Accessibility bug: no "title" attribute for the input element

Hmm, the label association is just

<label for="foo">my label:</label>   <input dojoType=dijit.form.ComboBox id="foo" name="foo">

Is that not working for you?

As for "title"... _Widget.js defines attributeMap to send title to the domNode... is that not working for you?

Please attach a test case.

comment:2 Changed 11 years ago by bill

Component: Dijit - LnFDijit

comment:3 Changed 11 years ago by Douglas Hays

Component: DijitAccessibility
Owner: set to Becky Gibson

The title attribute is currently being put on the domNode and not the INPUT element.

comment:4 Changed 11 years ago by bill

Milestone: tbd1.4

1.3rc1 has been release; bumping remaining tickets to 1.4 (except for documentation/testing tickets)

Changed 10 years ago by Becky Gibson

Attachment: 8676.patch added

comment:5 Changed 10 years ago by Becky Gibson

Cc: Douglas Hays added
Summary: ComboBox: Accessibility bug: no "title" attribute for the input element[patch] [ccla] ComboBox: Accessibility bug: no "title" attribute for the input element

Added patch with simple fix: add title into the attributeMap for _formWidget and assign to focus node. Added title to attributeMap of ComboButton? and assigned to titleNode. I added test cases to any of the widgets where I thought this might be a problem - slider was my biggest worry since there is no input field. In the case where there is no label but there is a title, the screen reader will now speak the title attribute. For buttons the screen reader will still speak the text, but on mouse over the specified title attribute will be displayed. I thought there was a ticket requesting that functionality (title attribute on button separate from the displayed text) but I couldn't find it. Since this affects all form widgets I would appreciate a code review - thx.

comment:6 Changed 10 years ago by bill

Looks good to me.

I worry about "title" as an attribute name, since the tooltip for tab labels (#7508) or TitlePane (#9416) will need a different attribute name, like "domTitle" (as Becky suggested) or "tooltip". OTOH "title" is an HTML standard so it makes sense to use it for things like ComboBox and Button.... so I'm OK with it.

One other thing: I guess ValidationTextBox's promptErrorMessage (which IIUC ComboBox inherits) isn't good enough?

comment:7 Changed 10 years ago by Becky Gibson

Yes, people could use the promptErrorMessage but the title attribute will replace a label for identifying the control. Some designers don't like visible text or image labels on some controls because they think the behavior is obvious. Adding the title attribute provides a way to add a "label" for the screen reader because if there is no label element associate with a control the screen reader will speak the title attribute instead.

comment:8 Changed 10 years ago by Becky Gibson

Resolution: fixed
Status: newclosed

(In [20215]) fixes #8676 add HTML title attribute to _formWidget and comboButton attributeMap. This will allow title attribute specified in markup or on programmatically created widget to be persisted on the focusNode (titleNode on combobutton). Updated test files so at least one example includes a title attribute.

comment:9 Changed 10 years ago by bill

(In [20242]) Provide tooltip for TitlePane title, via new "tooltip" attribute (fixes #9416 !strict). "tooltip" attribute can also be used for future tooltip for tab labels etc. (refs #7508).

Also fixed description of title attribute (refs #8676 etc)

!strict

Note: See TracTickets for help on using tickets.