w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
181 stars 48 forks source link

Further clarifications needed for images #293

Closed scottaohara closed 2 years ago

scottaohara commented 3 years ago

revisions to consider after 1.0:

sinabahram commented 3 years ago

I think I am a fan of forbidding aria-label, but I would want to make sure aria-labelledby works because there are cases in which organizations most-certainly do wish to visually surface alt text. I have several such projects and am encouraging more, for true inclusion around visual description practices within the cultural sector. Doubling that info in the alt makes for a noisy interface. Yes, aria-hidden on various elements and other workarounds can be used, but if they didn't need to be, that would make things much easier.

I know it is a bit off topic, but one of the most irritating things is how figure is handled. I currently have to hear the entire caption as the accessible name of a figure, then the alt text, then the entire caption again as the AT informs me the about the end of the figure. It is beyond aggravating, and I would want to prevent any such doubling up here, which is why I think I'm a fan of forbidding aria-label, though it does bother me a bit from a purely technical perspective. I know those are totally different use cases, but just something to keep in mind.

Lots to think about.

scottaohara commented 3 years ago

thank you @sinabahram

JAWS-test commented 3 years ago

should image rules be updated to be based on whether the img has an accessible name, rather than if an alt is used or not.

But this is already stated in the specification at present:

Otherwise, if the img has an author defined accessible name, see img with alt="some text".


should we not recommend aria-label be used on an image at all? i don't really understand the use case as to why someone would use aria-label over an alt, or even use both together as per my above point, but even possibly more troubling if the values are different.

I would not ban things as seeming useless, but only things that can lead to problems with output by AT. I see no problem with aria-label am img.

I also don't see why alt and aria-label causes problems:

scottaohara commented 3 years ago

But this is already stated in the specification at present:

it is, but it could stand to be clearer since the rules are contingent on the img having an alt, and not explicitly about whether it has accessible name at all. so right now conformance checkers would not be incorrect to state that <img src=... alt="" aria-label=foo role=button> is an error, because the alt="" rule states that there should be no role or aria- attributes set.

I would not ban things as seeming useless,

I didn't say ban. I said not recommend. Regarding problems:

scottaohara commented 2 years ago

Closing this issue in favor of https://github.com/w3c/html-aria/issues/424