Closed Bug 1576509 Opened 5 years ago Closed 5 years ago

Make the contextual feature recommender (CFR) usable by keyboard users

Categories

(Firefox :: Messaging System, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 71
Iteration:
71.3 - Sept 30 - Oct 13
Tracking Status
firefox70 --- verified
firefox71 --- verified

People

(Reporter: asa, Assigned: k88hudson)

References

Details

(Keywords: access, Whiteboard: [skyline] [access-p1])

Attachments

(3 files, 1 obsolete file)

Right now, the contextual feature recommender adds a "Recommendations" button to the addressbar which does not get announced to screen reader users unless they happen to stumble upon it. We should figure out how to make this feature more obvious to screen reader users.

Component: Disability Access → Messaging System

(In reply to Asa Dotzler [:asa] from comment #0)

Right now, the contextual feature recommender adds a "Recommendations" button to the addressbar which does not get announced to screen reader users unless they happen to stumble upon it. We should figure out how to make this feature more obvious to screen reader users.

I've been investigating and it looks like the "correct" approach would be to give the contents of the button an aria-role of "alert", which should announce it to the screen reader as soon as the content becomes visible. The big issue with that is that it seems VoiceOver (mac) doesn't currently recognize aria-roles at all, so it would only be a partial solution.

(In reply to Emily McMinn :emcminn from comment #1)

I've been investigating and it looks like the "correct" approach would be to give the contents of the button an aria-role of "alert", which should announce it to the screen reader as soon as the content becomes visible.

That's true, but there are two gotchas there:

  1. The button is currently just labelled "Recommendation". I'm not sure if hearing just "alert, Recommendation" is going to make any sense to the user. I tend to think those labels need to be more descriptive anyway; e.g. "Feature recommendation", "Add-on recommendation", as is indicated by the category icons. However, I wonder whether we might need to go a step further than that with our message; e.g. "Feature recommendation available". A message different to the label will require the message to be somewhere other than the button.
  2. If you put role="alert" on the button, the alert role will override the button role. That is, the user will hear it get reported as an 'alert" when they tab to the button instead of hearing it reported as a "button". That could be confusing, since the user won't know how to interact with it.

The big issue with that is that it seems VoiceOver (mac) doesn't currently recognize aria-roles at all, so it would only be a partial solution.

Firefox support for Mac accessibility is limited and broken at best, unusable at worst, so we shouldn't use Mac as a baseline for support here. I'd focus on Windows with NVDA for now. (That said, once our Mac support does improve, anything we do here will start working there, too.)

(In reply to James Teh [:Jamie] from comment #2)

  1. The button is currently just labelled "Recommendation". I'm not sure if hearing just "alert, Recommendation" is going to make any sense to the user. I tend to think those labels need to be more descriptive anyway; e.g. "Feature recommendation", "Add-on recommendation", as is indicated by the category icons. However, I wonder whether we might need to go a step further than that with our message; e.g. "Feature recommendation available". A message different to the label will require the message to be somewhere other than the button.

We're currently using the same string for label and title/tooltip, but we could probably add a more detailed string for the button title that could then be read as the alert. "[Type] recommendation available" would probably be pretty doable if we're able to use the Fluent strings.

  1. If you put role="alert" on the button, the alert role will override the button role. That is, the user will hear it get reported as an 'alert" when they tab to the button instead of hearing it reported as a "button". That could be confusing, since the user won't know how to interact with it.

I've been experimenting with putting the role="alert" on the label so that the button role doesn't get overridden, but putting the message somewhere other than the button might be the best approach since that would also make having a different string a little easier - we could write an sr-only alert that is triggered by the button switching from "hidden" to "display:block", for example.

Firefox support for Mac accessibility is limited and broken at best, unusable at worst, so we shouldn't use Mac as a baseline for support here. I'd focus on Windows with NVDA for now. (That said, once our Mac support does improve, anything we do here will start working there, too.)

Good to know!

Hi Asa, I've got a quick patch put together but I don't know if it'll work as expected, since I don't have a Windows setup - if you want to give it a try and let me know if it does what I think it does, feedback would be welcome :)

Flags: needinfo?(asa)

(In reply to Emily McMinn :emcminn from comment #5)

Hi Asa, I've got a quick patch put together but I don't know if it'll work as expected, since I don't have a Windows setup - if you want to give it a try and let me know if it does what I think it does, feedback would be welcome :)

I don't have a build environment (been a couple of years since I did) but if you could trigger a try build with your patch (something I don't know how to do) I'd be more than happy to test that out. Also, adding Marco to this bug because he's a more experienced screen reader tester than I am.

Flags: needinfo?(asa)
Assignee: nobody → khudson
Iteration: --- → 71.1 - Sept 2 - 15
Priority: -- → P1

Marco, can you give this a spin please? Thanks!

Flags: needinfo?(mzehe)
Iteration: 71.1 - Sept 2 - 15 → 71.2 - Sept 16 - 29

Unfortunately, this does not yet do what we want. The alert appears, gets a label, and is associated to the button as its description, but it does not get spoken by NVDA when I activate the first of the CFRs from the about:newtab dev tools. The reason is probably because due to the way this patch is written, this recommendation available alert is already present upon start of Firefox. Automatic speaking only triggers when it appears, and not if something appears that has this thing as its description.

Flags: needinfo?(mzehe)
Keywords: access
Whiteboard: [skyline]
Iteration: 71.2 - Sept 16 - 29 → 71.3 - Sept 30 - Oct 13

Thanks much for your work on this, Emily. Getting this kind of thing working just the right way is a little tricky. :)

I'm now working on this. I have a working implementation (tested by Marco, Asa and me), but need to figure out localisation and write tests.

Previously, keyboard users had to press f6 several times to get to the doorhanger.
If a user is activating the doorhanger from the keyboard, it makes sense that they'd want to interact with it.

Note that the second and third patches here aren't complete, which is why I haven't specified a reviewer for them yet. I need to figure out how to localise the "Recommendation available" message and how to test the CFR doorhanger focus stuff. I'm posting them now in case anyone is interested in taking an early look and/or helping me out given the time pressure here.

Keywords: leave-open
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e062c3bc7cbd
Add a function to announce a message to screen reader users. r=Gijs,yzen
Attachment #9097553 - Attachment description: Bug 1576509: When a CFR appears, announce this to screen reader users. → Bug 1576509: Give the CFR address bar button a more descriptive tooltip/a11y label. Announce its appearance to screen reader users.
Depends on: 1585907
Blocks: 1585907
No longer depends on: 1585907

Asa and I agree this should be a p1 for accessibility. However, we acknowledge there's a high likelihood this won't make it into 70 due to risk and timing. It should have been tracked as affecting 70 from the start, but wasn't due to oversight on our part.

Whiteboard: [skyline] → [skyline] [access-p1]

Oops. This was already tracked as affecting 70. My bad.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a7ca42f7bdc
When a CFR doorhanger is activated via the keyboard, focus its first element. r=andreio

Comment on attachment 9097554 [details]
Bug 1576509: When a CFR doorhanger is activated via the keyboard, focus its first element.

Beta/Release Uplift Approval Request

  • User impact if declined: CFR recommendations will not be realistically usable by keyboard users, including screen reader users.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None. Please note that the other patches from this bug should NOT be uplifted.
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Straightforward patch which only affects keyboard activation of CFR doorhangers. Covered by automated tests.
  • String changes made/needed: None.
Attachment #9097554 - Flags: approval-mozilla-beta?

Comment on attachment 9097554 [details]
Bug 1576509: When a CFR doorhanger is activated via the keyboard, focus its first element.

A11y fix for skyline, OK for beta 14 uplift.
Just this patch.

Attachment #9097554 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Can you file a follow bug here for the remaining work and we can close this one for 70 and 71?
Otherwise this keeps showing up in queries the sheriffs and relman use to see what patches need to land.

Flags: needinfo?(khudson)
See Also: → 1587809
See Also: → 1587808

Done:

  • Announce the CFR address bar button appearance to screen reader users, bug 1587809
  • Add a screen-reader visible description to the recommendation button, bug 1587808

Hope I didn't miss anything :)

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(khudson)
Resolution: --- → FIXED

Thanks Andrei!

Keywords: leave-open
Target Milestone: --- → Firefox 71

Adjusting the summary to reflect what actually got fixed in both 70 and 71.

Summary: Make the contextual feature recommender (CFR) accessible to screen reader users → Make the contextual feature recommender (CFR) usable by keyboard users

I have verified that this issue is no longer reproducible with the latest Firefox Nightly (71.0a1 Build ID - 20191010214019) and latest Firefox Beta (70.0b14 Build ID - 20191010142853) installed on Windows 10 x64, Arch Linux and Mac 10.14.5. Now, when the CFR doorhanger is activated via keyboard, the first element from inside of it is focused.

Status: RESOLVED → VERIFIED

Comment on attachment 9097553 [details]
Bug 1576509: Give the CFR address bar button a more descriptive tooltip/a11y label. Announce its appearance to screen reader users.

Revision D47718 was moved to bug 1587809. Setting attachment 9097553 [details] to obsolete.

Attachment #9097553 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: