Opened 8 years ago

Last modified 6 years ago

#16307 closed defect

[PATCH][CCLA] dijit.TooltipDialog: invalid aria role and missing aria attributes — at Version 1

Reported by: mikeb Owned by: mikeb
Priority: undecided Milestone: 1.8.4
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Dijit.TooltipDialog has the role of dialog. However, I think that role=alertdialog is more appropriate because "Unlike alert, alertdialog can receive a response from the user", which is what TooltipDialog? is for (form elements.)

Aside from changing the role, we also need to have aria-labelledby attribute. This gets set from _HasDropDown on either the dropDown.containerNode (for FiltereingSelect and ComboBox) or dropDown.domNode (for Select, TabContainer, DropDownButton, DateTextBox, and TooltipDialog.) We have to have a few checks to not overwrite the current aria-labelledby (if there is one, like on DateTimeTextBox) and not to apply it if there is a role=presentation.

This should be enough to correctly set aria-labelledby on any dijit that is used as the dropDown, since dijits set up their aria roles and properties in either the containerNode or domNode. Since there is no "role" attachPoint for all of the dijits I think we need this conditional instead of just being able to set aria-labelledby for all dijits (like we did on #15885 with _popupStateNode).

As part of this change I needed to move the role=listbox of the Select up one level to the domNode. This doesn't affect anything with Select since aria-owns gets set to the domNode anyway.

Change History (2)

Changed 8 years ago by mikeb

change role of TooltipDialog? to alertdialog, set aria-labelledby on dropDown dijit in _hasDropDown, please proxy commit for michael billau CCLA on file with IBM

comment:1 Changed 8 years ago by bill

Description: modified (diff)
Owner: changed from bill to mikeb
Status: newpending

Hmm, why do you have to sometimes set aria-labelledby on the popup's containerNode, but sometimes on the domNode? Why not always on the domNode? And why only check if aria-labelledby is already set in one of those cases?

The other thing is that you need to add automated tests for this functionality; you can't just add code to _HasDropDown without any (automatic) verification. It may be sufficient to add new checks to the existing tests.

Note: See TracTickets for help on using tickets.