Opened 7 years ago

Closed 7 years ago

#16027 closed defect (fixed)

[PATCH][CCLA] dijit.form.CheckBox - remove superfluous aria attributes

Reported by: mikeb Owned by: mikeb
Priority: undecided Milestone: 1.8.2
Component: Dijit - Form Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

dijit.form.CheckBox? has aria role="presentation" but uses aria-checked attribute. Aria-checked attribute is not a global aria attribute and can only be used on specific roles. To fix this I have decided it is best to remove the aria-checked attribute instead of changing the role to role=checkbox. This is because the WAI-ARIA spec states that WAI-ARIA should not be used as a replacement of normal HTML semantics.(http://www.w3.org/TR/wai-aria/introduction#co-evolution)

Patch also updates the test pages for CheckBox? and Button (needed to check ToggleButton?)

Attachments (3)

Checkbox.patch (3.2 KB) - added by mikeb 7 years ago.
removes aria-checked attribute from dijit.form.Checkbox since it has no aria role; updates test pages; please proxy commy for michael billau ccla on file with IBM
16027.patch (3.8 KB) - added by Douglas Hays 7 years ago.
proposed fix with role=checkbox added plus TriStateCheckBox fixes
16027-2.patch (5.0 KB) - added by mikeb 7 years ago.
set _aria_attr so that TriStateCheckbox? sets aria-checked, remove aria-readonly from TriStateCheckbox?, update test page

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by mikeb

Attachment: Checkbox.patch added

removes aria-checked attribute from dijit.form.Checkbox since it has no aria role; updates test pages; please proxy commy for michael billau ccla on file with IBM

comment:1 Changed 7 years ago by Douglas Hays

Milestone: tbd1.8.2

comment:2 Changed 7 years ago by Douglas Hays

Owner: changed from Douglas Hays to mikeb
Status: newpending

mikeb, please test with the attached 16027.patch that adds role=checkbox to see if the violations are gone, and also check dojox/form/TriStateCheckBox since it inherits.

Changed 7 years ago by Douglas Hays

Attachment: 16027.patch added

proposed fix with role=checkbox added plus TriStateCheckBox fixes

comment:3 Changed 7 years ago by mikeb

Status: pendingnew

doughays, I tested out the patch and it worked really well for CheckBox?. I had to make one slight change to TriStateCheckBox? (set _aria_attr: "aria-checked", because it was setting aria-pressed instead.) I also removed the aria-readonly from TriStateCheckbox? because that is invalid and updated the test page.

Changed 7 years ago by mikeb

Attachment: 16027-2.patch added

set _aria_attr so that TriStateCheckbox? sets aria-checked, remove aria-readonly from TriStateCheckbox?, update test page

comment:4 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

In [29816]:

Fixes #16027. Add role=checkbox/radio and aria-checked to CheckBox? and RadioButton? widgets.

Note: See TracTickets for help on using tickets.