WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 159022
211176
AX: support alternative text for "content" property
https://bugs.webkit.org/show_bug.cgi?id=211176
Summary
AX: support alternative text for "content" property
Haroen Viaene
Reported
2020-04-29 02:41:32 PDT
By default, the text in a "before" or "after" generated content will be read by a screen reader, but it's often used for things like "★", which, if they were a DOM element would warrant an aria-label. Giving alternative text in the generated content directly will help people to give a better alternative, or to suppress certain decorative character Chrome seems to have shipped this:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/nC5p6W8nM3g
Issue in FireFox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1281158
The spec seems to be here:
https://drafts.csswg.org/css-content-3/#alt
Attachments
Picture
(90.10 KB, image/png)
2020-05-12 09:46 PDT
,
chris fleizach
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-04-29 02:41:42 PDT
<
rdar://problem/62585984
>
chris fleizach
Comment 2
2020-04-29 09:47:23 PDT
It looks like we support [aria-expanded="test6"]::before { content: "\25BC"; alt: "test"; } but probably not this style .new::before { content: url(./img/star.png) / "New!"; /* or a localized attribute from the DOM: attr("data-alt") */ }
Jorge Fernandes
Comment 3
2020-05-12 00:21:54 PDT
(In reply to chris fleizach from
comment #2
)
> It looks like we support > > [aria-expanded="test6"]::before { > content: "\25BC"; > alt: "test"; > } > > but probably not this style > > .new::before { > content: url(./img/star.png) / "New!"; > /* or a localized attribute from the DOM: attr("data-alt") */ > }
I tried
> [aria-expanded="test6"]::before { > content: "\25BC"; > alt: "test"; > }
and VO don't read the alt.
chris fleizach
Comment 4
2020-05-12 09:45:47 PDT
This appears to work for me. see the screen shot <style> .new::before { content: "\25BC"; alt: "test"; } </style> <div class="new">hello</div>
chris fleizach
Comment 5
2020-05-12 09:46:08 PDT
Created
attachment 399136
[details]
Picture
James Craig
Comment 6
2022-03-15 16:17:57 PDT
dupe of
bug 159022
that includes test case *** This bug has been marked as a duplicate of
bug 159022
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug