[a11y] Autofill addresses/credit card check boxes in preferences are unlabelled for accessibility

RESOLVED FIXED in Firefox 60

Status

()

enhancement
RESOLVED FIXED
Last year
Last year

People

(Reporter: Jamie, Assigned: Jamie)

Tracking

({access})

unspecified
mozilla60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

STR:
1. Start Firefox and the NVDA screen reader.
2. Open Firefox Options and select Privacy & Security.
3. Tab to the Autofill addresses check box.
Expected: NVDA should report "Autofill addresses check box..."
Actual: It reports just "check box..."
4. Tab to the Autofill credit cards check box.
Expected: NVDA should report "Autofill credit cards check box..."
Actual: It reports just "check box..."

These check boxes use a separate XUL label (rather than using the label attribute of the checkbox element), so accessibility doesn't pick up the label. Furthermore, the label element also contains the "Learn more" link, so we can't just set an id on the label and set the aria-labelledby attribute on the checkbox to the label's id; doing so would cause the accessible label to be, for example, "Autofill addresses Learn more".

The correct solution is probably to have a separate element inside the label element which just contains the text minus the Learn more link, set an id on that element and then set aria-labelledby on the checkbox to that id. The inner element should have no visual impact; we're just using it so we can have an id. In HTML, I'd use <span>, but I'm not sure what to use in XUL. I'm guessing <box> would have visual impact. (I'm a screen reader user, so I can't verify this properly.)

I'm submitting a patch which just uses aria-label instead of aria-labelledby, but that does mean we're duplicating the string. Happy to clean this up with guidance... or leave it as is.
Comment on attachment 8957420 [details]
Bug 1444283: Label the "Autofill addresses" and "autofill credit cards" check boxes for accessibility.

https://reviewboard.mozilla.org/r/226338/#review232272

Hi James,

The patch seems good. However, I'm not that familiar with the accessibility things and have actually been being inactive for a while so I'm afraid I can't review your patch any time soon. Would you mind asking someone else in the team for help? Thanks and sorry for the inconvenience.
Attachment #8957420 - Flags: review?(lukechang1209)
Comment on attachment 8957420 [details]
Bug 1444283: Label the "Autofill addresses" and "autofill credit cards" check boxes for accessibility.

https://reviewboard.mozilla.org/r/226338/#review232510

Thanks
Attachment #8957420 - Flags: review+
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eb7464de4a57
Label the "Autofill addresses" and "autofill credit cards" check boxes for accessibility. r=MattN
https://hg.mozilla.org/mozilla-central/rev/eb7464de4a57
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.