Closed Bug 1280472 Opened 8 years ago Closed 8 years ago

[a11y] clear your recent history, remove individual cookies, etc. links not reachable via keyboard

Categories

(Firefox :: Settings UI, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 50
Tracking Status
firefox49 --- fixed
firefox50 --- verified

People

(Reporter: Jamie, Assigned: Gijs)

References

Details

(Keywords: access)

Attachments

(2 files)

STR: 1. Open Firefox Options (e.g. Tools menu -> Options). 2. Select the Privacy page. 3. Tab to the "Firefox will:" drop-down in the History group. 4. Press tab again. Expected: Focus should land on the "clear your recent history" link. Actual: Focus skips this link. Instead, it moves out of the History group into the Location Bar group. This also applies to the "manage your Do Not Track settings" and "remove individual cookies" links. There is no way to focus these links (class: inline-link) at all using the keyboard.
These links do have href="#", which normally makes an <a> tag focusable. However, for some reason, this doesn't seem to work here. Is this a weird XUL/HTML interaction? Setting tabindex="0" does fix this. Fixing the href="#" failure is perhaps the more "correct" solution, but it's also probably much harder.
Gijs, any idea on this why that a with an href doesn't get focus by default?
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Marco Zehe (:MarcoZ) from comment #2) > Gijs, any idea on this why that a with an href doesn't get focus by default? Nope. It seems Services.focus.elementIsFocusable(content.document.getElementById("historyRememberCookies"), false); returns false. It shouldn't. I don't know why it does, and a quick look at code isn't helpful. Neil probably does? Another workaround besides tabindex="1" would be to use a XUL <label> instead of an <html:a> -- this is what the other links that *are* focusable do (e.g. 'learn more' after do not track). Are they reasonably accessible otherwise?
Flags: needinfo?(mzehe)
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(enndeakin)
(In reply to :Gijs Kruitbosch from comment #3) > Another workaround besides tabindex="1" Maybe a typo, but note i was suggesting tabindex="0", not "1", as "1" will give it precedence over other stuff without a tabindex, which I don't think what we want. > would be to use a XUL <label> > instead of an <html:a> -- this is what the other links that *are* focusable > do (e.g. 'learn more' after do not track). Are they reasonably accessible > otherwise? Yes. I assumed there was some specific reason label wasn't being used here...
(In reply to :Gijs Kruitbosch from comment #3) > Another workaround besides tabindex="1" would be to use a XUL <label> > instead of an <html:a> -- this is what the other links that *are* focusable > do (e.g. 'learn more' after do not track). Are they reasonably accessible > otherwise? They are perfectly accessible when marked up as a link, yes.
Flags: needinfo?(mzehe)
Debugging shows that the file has the base url 'about:preferences#privacy'. A link of '#' in there would become 'about:preferences#privacy#' which when trying to construct a url for this throws NS_ERROR_MALFORMED_URI, so it is link with an invalid uri and thus not focusable.
Flags: needinfo?(enndeakin)
(In reply to James Teh [:Jamie] from comment #1) > Setting tabindex="0" does fix this. Err... no. It fixes the focusability, but you can't press enter to activate it. Sorry.
Attached patch Patch (deleted) — Splinter Review
This changes the href="#" to href="javascript:void(0)", which is a valid URL and thus works as expected. I don't know whether this is an acceptable solution, however.
Assignee: nobody → jamie
Status: NEW → ASSIGNED
Comment on attachment 8763149 [details] [diff] [review] Patch Jared, I'd be fine with this, but we could also switch to <label> if you think that's better, or try and write more complicated JS to fix the hrefs to make sense, or something. Though tbh, I also don't think "#" should just be appended to the document base URI... just "#" as a link should work irrespective of the hash that's in use on the page. :-\
Attachment #8763149 - Flags: review?(jaws)
(In reply to :Gijs Kruitbosch from comment #9) > Comment on attachment 8763149 [details] [diff] [review] > Patch > > Jared, I'd be fine with this, but we could also switch to <label> if you > think that's better, or try and write more complicated JS to fix the hrefs > to make sense, or something. > > Though tbh, I also don't think "#" should just be appended to the document > base URI... just "#" as a link should work irrespective of the hash that's > in use on the page. :-\ So basically this is because the about protocol handler doesn't care about baseURI and just ignores it, so relative URIs don't work. Changing to an absolute "about:preferences#privacy" (or any other hash or lack thereof) would also work. Changing the about protocol handler to make this work would be somewhat useful for things like about:support, I guess? But also scary. :-\
Depends on: 1280584
Comment on attachment 8763149 [details] [diff] [review] Patch Review of attachment 8763149 [details] [diff] [review]: ----------------------------------------------------------------- I would prefer that we use a xul:label with class="text-link" here. The javascript:void(0) isn't seen often in our codebase, and it appears odd in the status bar.
Attachment #8763149 - Flags: review?(jaws) → review-
Flags: needinfo?(gijskruitbosch+bugs)
Assignee: jamie → gijskruitbosch+bugs
Flags: needinfo?(gijskruitbosch+bugs)
Blocks: 1281407
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, https://reviewboard.mozilla.org/r/60296/#review57472
Attachment #8764368 - Flags: review?(jaws) → review+
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d724f337b4f0 fix focusing of text links in about:preferences, r=jaws
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Depends on: 1282794
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60296/diff/1-2/
Attachment #8764368 - Flags: review+ → review?(dao+bmo)
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, Can we get rid of inline-link? It only appears to be used by browser/base/content/sync/genericChange.xul and browser/base/content/sync/setup.xul at this point.
Attachment #8764368 - Flags: review?(dao+bmo)
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60296/diff/2-3/
Attachment #8764368 - Flags: review?(dao+bmo)
Blocks: 1284497
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, The inline-link thingy in toolkit/mozapps/update/content/updates.xul is entirely separate. Let's not touch this here.
Attachment #8764368 - Flags: review?(dao+bmo)
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60296/diff/3-4/
Attachment #8764368 - Flags: review?(dao+bmo)
Attachment #8764368 - Flags: review?(dao+bmo) → review+
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/fx-team/rev/d69c5dd616ad fix focusing of text links in about:preferences, r=dao
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
I have reproduced this bug with Nightly 50.0a1 (2016-06-16), windows 8.1 64bit! The bug's fix is verified on Latest Nightly 50.0a1. Build ID : 20160713030216 User Agent : Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 [bugday-20160713]
Status: RESOLVED → VERIFIED
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, Approval Request Comment [Feature/regressing bug #]: n/a [User impact if declined]: some links in the preferences have poor contrast and aren't keyboard accessible [Describe test coverage new/current, TreeHerder]: minimal, these are mostly styling changes [Risks and why]: low risk, baked for a week and has been verified [String/UUID change made/needed]: nope
Attachment #8764368 - Flags: approval-mozilla-aurora?
Comment on attachment 8764368 [details] Bug 1280472 - fix focusing of text links in about:preferences, This patch fixes some non-accessible links via keyboard in a11y and is verified. Take it in 49 aurora.
Attachment #8764368 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: