Closed scottaohara closed 3 years ago
Question: Did you want to allow <img src="url" role="presentation">
for "img without alt attribute"?
(i.e. the example given in #229)
If so, might want to change the first sentence under "img without alt attribute" from:
If no author-defined accessible name is provided by other methods: No role, and no aria-* attributes except aria-hidden.
to something like:
If no author-defined accessible name is provided by other methods: Roles: none or presentation. No aria-* attributes except aria-hidden.
@carmacleod no. Then that could result in instances of the file name of the image being announced without the image role.
If an author can add role=presentation
to their <img>
then it stands to reason they can add the shorter alt=""
attribute and meet HTML's requirements to add an alt
.
commit to remove allowance for
role=presentation
androle=none
on an<img src=... alt="">
. Declaring these roles should be considered redundant/unnecessary per thealt=""
.If there are situations where an image with
alt=""
is not being set to decorative, (thinking an img with a .svg source in webkit) then authors can still usearia-hidden=true
to force the element to be hidden to the a11y tree (and would have needed to use that anyway).closes #229
Preview | Diff