Closed Bug 1566878 Opened 5 years ago Closed 5 years ago

A placeholder link is announced as "link" with TalkBack

Categories

(Core :: Disability Access APIs, defect, P2)

68 Branch
All
Android
defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: scottaohara, Assigned: Jamie)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

  1. With TalkBack enabled (for instance, TB 7.3 on Android 8.1) navigate to this test page:
    https://scottaohara.github.io/tests/html-a/a-no-href.html

  2. Swipe through the web page until focus has reached the "My anchor" text.

Actual results:

"My anchor" is announced as a "link"

Expected results:

Since the <a> element has no href, it should be treated as a placeholder link, and expose no role.

If attempting to navigate by "links" with TalkBack on, the element is correctly not navigated to, which creates a discrepancy with what TalkBack indicates is available in the document, vs what people can actually hear announced.

Additionally:
As noted in HTML AAM, https://w3c.github.io/html-aam/#el-a-nohref an <a> with no href should not be exposed as a link.

FWIW, testing with NVDA and JAWS on desktop Firefox an anchor without an href is not announced as a link, unless it is given an onclick attribute.

Hello, thanks for your report.
I tried to reproduce your problem and I can see a difference between the Chrome announcement and Firefox announcement for your example.

Devices:

  • Google Pixel (Android Q);
  • Xiaomi Mi 8 Lite (Android 9);

Builds:

  • Nightly 70.0a1 (2019-07-26) - treeherder;
  • Beta 68.1b3;
  • Release 68.0.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Android
Hardware: Unspecified → All

<a> without href is exposed by Gecko as role link, but with no linked state (href exposes the linked state). Windows screen readers don't speak the link role with no linked state.

We should fix our Android exposure to do the right thing (whatever that is; e.g. don't expose the link role) for a link with no linked state.

Component: General → Disability Access APIs
Priority: -- → P2
Product: Firefox for Android → Core
Version: Firefox 68 → 68 Branch

Marco, do you think this should be a p1? Do you see many links that aren't really links with Firefox + Talkback in the wild? I would think all anchor targets would get incorrectly reported like this, but maybe not?

Flags: needinfo?(mzehe)

I actually don't see these in the wild at all. I see pages with Skip links, but the targets, if they are still being generated with a named anchor instead of just an ID, don't appear to me or TalkBack as links. Or people have stopped using named anchors largely and are relying on an ID to get the skip links to work, which is pretty likely. I'd say this is a P2, we should definitely do it, but it doesn't make Firefox unusable with TalkBack.

Flags: needinfo?(mzehe)

Gecko's link role is used even for <a> elements without href or onclick.
Actionable links are indicated using the linked state.
However, Android doesn't have a concept equivalent to the linked state.
Thus, on Android, we must not expose an element as a link at all if it does not have the linked state.

Assignee: nobody → jteh
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb7a5583b457
Android a11y: Don't expose <a> elements with no href or onclick as links. r=MarcoZ
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: