#16204 closed defect (fixed)
[PATCH][CCLA] dijit.CheckedMenuItem - add aria-checked to initially empty CheckedMenuIte
Reported by: | mikeb | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.4 |
Component: | Dijit | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
If a dijit.CheckedMenuItem? is initially "unchecked" or left blank, than we see an accessibility violation because the node will have role="menuitemcheckbox" but will be missing the required "aria-checked" attribute: http://www.w3.org/TR/wai-aria/roles#menuitemcheckbox
It is left like this until the user toggles the checkbox. The attached patch just sets the aria-checked attribute for the initial checkbox by adding aria-checked="${checked}"
in the CheckedMenuItem? template. It also fixes up the Menu test page.
Attachments (2)
Change History (9)
Changed 8 years ago by
Attachment: | checked-menu-item-aria-checked-initially-blank.patch added |
---|
comment:1 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|---|
Status: | new → assigned |
Hmm, the _setCheckedAttr() constructor sets the aria-checked property... unfortunately (for this case) it isn't getting called on construction, see #7381.
comment:2 Changed 8 years ago by
Anyway, the patch seems OK (working around #7381), but it should have tests to make sure that aria-checked is getting set correctly initially, plus that it's getting changed when a CheckedMenuItem is clicked.
comment:4 Changed 8 years ago by
Is there any way that we can backport this accessibility functionality to 1.8?
I created a patch that just has changes from [29860] in it. I compared the changed pages with the nightly build and there are some differences due to other tickets that weren't backported:
- templates/CheckedMenuItem.html - nightly has "textDirNode", added from [29594]
- test/robot/Menu_a11y.html - nightly has additional keyboard tests from [29912] (multiple letter navigation)
- tests/test_Menu.html - nightly has many changes adding letter navigation from [29912]. Nightly also has an additional aria-label from [29906]. I think [29906] needs to be backported to 1.8 as well but I will attach that patch to the appropriate ticket.
I tested the test pages and they pass the automated tests.
Changed 8 years ago by
Attachment: | backport-CheckedMenuItem-accessibility.patch added |
---|
Backport accessibility fixes to CheckedMenuItem? to 1.8 using 29860, please proxy commit for Michael Billau
comment:7 Changed 8 years ago by
Milestone: | 1.9 → 1.8.4 |
---|
adds aria-checked attribute to initally empty CheckedMenuItem?; fixes up test case; please proxy commit for Michael Billau CCLA on file with IBM