#16466 closed defect (fixed)
[PATCH][CCLA] dijit.popup functionality needs aria roles and attributes
Reported by: | mikeb | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.4 |
Component: | Dijit | Version: | 1.8.2rc1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Anything that uses popup functionality from _popup.js needs to have aria-label and aria-role attributes. This is because according to WAI-ARIA, all content needs to be enclosed in either "page landmarks" or in a role=region. The problem is that _popup.js will create a "wrapper" for the popup dijit and appends this domNode to the end of the dom tree. This means that the popup dijit's contents will actually not be enclosed in a role=region or landmark unless the author has set the role attribute on the body tag. Not everybody can or should set role=main on the body element.
The patch takes care of automatically setting role="region" on the wrapper of the domNode. It also has to set aria-label attribute since role=region requires that attribute. I had some trouble trying to figure out what the best way to set the aria-label was, so I just look for various attributes ("aria-label", "label", "name") and eventually fall back on the ID.
I tested with JAWS14 and there is no difference in behavior with this patch.
I also created some automated test cases and verified that the test pages all still work. I think I hit every dijit that uses _popup.
Attachments (1)
Change History (7)
Changed 10 years ago by
Attachment: | add aria-label and role-region to _popup.js.patch added |
---|
comment:1 Changed 10 years ago by
Milestone: | tbd → 1.9 |
---|---|
Status: | new → assigned |
OK thanks. I needed to modify most of the patch to use modern AMD style (i.e. no reference to the dojo global) and to fix spacing, but I'll check in.
comment:6 Changed 9 years ago by
Milestone: | 1.9 → 1.8.4 |
---|
set role=region and aria-label on the wrapper element of any popup, plus tests, please proxy commit for michael billau ccla on file with ibm.