Closed Bug 1147359 Opened 9 years ago Closed 6 years ago

aria-hidden state not honoured with CSS generated content

Categories

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

36 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: tink, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150320202338

Steps to reproduce:

When content inside a button is generated using the CSS before/after selectors with aria-hidden applied, Firefox does not honour the hidden state of the content.

If the generated content is not inside a button, Firefox honours the hidden state as expected.

Test cases:
http://ljwatson.github.io/test-cases/aria-hidden/aria-hidden.html


Actual results:

Firefox disregards the hidden state and exposes the generated content as the accessible name for the button.


Expected results:

Firefox should not expose the generated content as the accessible name for the button. The content should not be available via the accessibility tree.
Hi Léonie,

The posted link by you is not working, can you please provide another examples of web pages so I can reproduce your issue on my environment? 

Also, can you please test this on the latest Firefox release (43.0.1) or latest Nightly (46.0a1, https://nightly.mozilla.org/) and tell me if this still reproduces for you ? When doing this please use a new fresh Firefox profile, maybe also in safe mode (https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems). Sometimes this kind of issues could appear when using custom settings, themes or some addons.

Thanks,
Cosmin.
Flags: needinfo?(tink)
Thanks Cosmin. 

I've reposted the test case and verified the results in Firefox 43 x64.
http://ljwatson.github.io/test-cases/aria-hidden/case.html

The CSS generated content is exposed as text in Firefox/IAccessible2. By contrast it is hidden in IE/MSAA as expected.
Flags: needinfo?(tink)
Hi Léonie,

I have tested your issue on  latest Firefox release (43.0.1),  latest Nightly (46.0a1). Exactly what do you want it to be hidden? The arrow from the button or  “::after” selector  from inspect element?
I have tested even in Chrome but I had the same result.

Thanks, 
Cosmin.
Flags: needinfo?(tink)
Cosmin,

in short, the generated content should be hidden and not exposed - it should honor/inherit the aria-hidden=true on the <span>.

Currently, using JAWS 17 and Firefox (tested using both stable and Developer Edition 45.0a2) the button in the example is announced as "foo single right pointing angle quotation mark button", and using aViewer (http://www.paciellogroup.com/resources/aviewer) to inspect the exposed accessibility tree shows that indeed the right pointing angle quotation mark is passed on as part of the accName (see attached foo-aviewer-firefox.png). Compare this to Chrome, which exposes only "foo" as part of the accName (see attached foo-aviewer-chrome.png)
Hi, 

I have try to reproduce the issue using the aViewer program but I have encountered some errors and could not test. 
Considering this, I will assign a component to this issue in order to involve the development team. Maybe someone with more experience on this could share an opinion. 

Thanks, 
Cosmin.
Component: Untriaged → Disability Access APIs
Product: Firefox → Core
Alex, I think we should take over from here, right? :-)
Blocks: aria
Flags: needinfo?(surkov.alexander)
css generated content is children of the accessible element the CSS rule was applied to. So no special processing is required, which means this bug should be fixed as bug 1123360 is fixed.
Flags: needinfo?(surkov.alexander)
Blocks: aria-hidden
No longer blocks: aria
Priority: -- → P2
Based on this <a href="http://ljwatson.test-cases/aria-hidden/index.html">test case</a>, the problem still exists in Firefox 54 and Nightly 56.
I can't seem to find this test case any more; none of the links in this bug work. However, this test case works correctly now that bug 1349223 is fixed:
data:text/html,<style>span:before { content: "before"; }</style><button><span aria-hidden="true"></span>content</button>
The button gets an accessible name of "content".
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: