-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make empty links report 2.4.4 violation #369
Comments
@robfentress thank you for the feedback. We think that when a link has no text at all, that is not an issue of a duplicate link (that would at least require two links and a text of some sort) but is rather due to one of two common errors:
Therefore this is mapped to 4.1.2 (role) and 1.1.1 (alternative text) |
The example that triggered the error for me was that the page had a skip link and the contents of the skip link was a span with text in it. That span had display:none set until the link received focus. Therefore, in essence the link was empty unless it had focus. I think 2.4.4 is most accurate, in this instance, because someone using a screen reader who comes across this link using the virtual cursor or by bringing up a list of links on the page will, likely, be presented with an empty link and will not know the purpose of the link. |
P.S. I don't remember what is presented in different screen readers when there are links with no content, but I'm guessing it will be something and that something will not be helpful. |
So, for reference, here are the S.C.s 2.4.4 Link Purpose (In Context): The purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context, except where the purpose of the link would be ambiguous to users in general. (Level A) 4.1.2 Name, Role, Value: For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies. (Level A) The Deque argument here is that if the name is missing, then it definitely violates 4.1.2 and you cannot even evaluate 2.4.4 when there is no link text (name). However, I can see your point... @WilcoFiers any objections to adding this S.C.? |
+1 to added a reference to SC 2.4.4 for this failure. Supported by F89 being listed as a failure for 2.4.4 https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/F89 |
feat: add S.C. 2.4.4 to link-name rule. Fixes #369
Though links that have no text result in a violation of the rule, link-name,
"Ensures links have discernible text"
the tags associated with this rule do not include wcag244, which, I think, is the most relevant success criterion that is violated. For reference, 2.4.4 is:The text was updated successfully, but these errors were encountered: