Description
Following a comment (#1028 (comment)) and meeting discussion, it would seem there are different points of view on how rules should handle multiple success criteria that apply to the same element.
Should there be different rules for an element that needs to meet multiple success criteria?
Or should multiple rules call out pass/fail on the same element?
The rule that raised the comment checks if a button (anything with a semantic role of button
) has an accessible name, but excludes input
elements of type="image"
because they also have to satisfy an additional success criteria.
So currently we have two rules checking that buttons have accessible names. And no rule checking that the accessible name of an image button describes its purpose (the additional requirement in SC1.1.1 that isn't part of SC4.1.2).
For these rules, I propose that "Button has accessible name" (97a4e1) should also apply to image buttons. Inapplicable example 1 should be removed and Passed and Failed examples of image buttons added. And that "Image button has accessible name" (59796f) should be reworked as "Image button has accessible name that describes its purpose".
An image button could then pass both rules, or pass the first rule but not the second giving implementers an opportunity to provide clearer error information.
Of course, these two rules could have been split out to reduce complexity in the first rule. In which case I propose that "Image button has accessible name" as it currently stands does not relate to SC1.1.1 and an additional rule about the accessible name describing the purpose of the image button is still required.
(incidentally, Passed examples 1 and 6 are essentially the same in "Image button has accessible name")
For reference: