Closed Bug 1444283 Opened 6 years ago Closed 6 years ago

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

Categories

(Toolkit :: Form Autofill, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

Details

(Keywords: access)

Attachments

(1 file)

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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: