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
term/definition should use aria-details instead of aria-labelledby #1147
Conversation
with this change should we also update definition to be prohibited from having aria-label / labelledby?. |
Yes, @jnurthen , do you think I should do that in this PR? |
Sounds good to me. |
Done, good catch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think we just need some capitalized SHOULDs here. otherwise i like these changes
@scottaohara Thanks for catching that. How's it look now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just made a quick commit to remove an extra end paragraph tag, but now it looks good to me!
Co-Authored-By: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should aria-label[ledby] should be prohibited on definition as well? It would sort-of defeat the purpose of using aria-details instead of aria-describedby if an author is able to flatten the definition with an aria-label?
@carmacleod, that makes sense to me. Let's bring it up at next week's meeting? How about we get this in for now and think about what to do about that? |
Yep - agreed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - thanks!
+1
oh, @aleventhal I actually thought you had updated i think we should prohibit the naming of |
…term, require that a term with a matching definition MUST use aria-details to point to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, @aleventhal I actually thought you had updated
definition
prohibitaria-label
andaria-labelledby
per our previous comments. completely glazed over that, and see it's justterm
here.i think we should prohibit the naming of
definition
here, it was one of the last things we talked about on the call this week.
Ok, I misunderstood. I've made that change. LMK what you think.
… that should provide a good screen reader experience in that case.
index.html
Outdated
<p>A word or phrase with a corresponding definition. See related <rref>definition</rref>.</p> | ||
<p>The <code>term</code> role is used to explicitly identify a word or phrase for which a <rref>definition</rref> has been provided by the author or is expected to be provided by the user.</p> | ||
<p>A word or phrase with an optional corresponding definition. See related <rref>definition</rref>.</p> | ||
<p>The <code>term</code> role is used to explicitly identify a word or phrase for which a <rref>definition</rref> has been provided by the author or is expected to be provided by the user. Where a matching <rref>definition</rref> exists, authors MUST set <pref>aria-details</pref> on the <code>term</code>, pointing to the <rref>definition</rref>. Otherwise, <pref>aria-details</pref> MUST point to a form or control that take user input that provides the definition.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regarding:
MUST point to a form or control that take user input that provides the definition
- that "takes" user input
- could this not also point to a link that takes users to the definition?
i like this idea though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could take the user to a link with the definition, but I'm not sure we really have to say that.
If I guess that would mean that a |
True, maybe we should leave that as a possibility. What do others think? |
Thinking about this more. What's the user benefit from having term marked up, when there is no definition? Screen readers don't have any special navigation keystrokes, and the fact that it's a term is going to be obvious from context. I would have thought that the benefits of using term come when you can tie the definition to it. |
a role parity argument could be made. since that said, i don't think it's a bad idea to strongly suggest that authors do create these associations...but it's not going to be possible to force a consistent pairing of terms and definitions for anyone using the |
So, we change it to SHOULD or MAY? |
SHOULD? |
Actually, I think I like that. Only a couple of nits:
Question: Should we also add a note to
|
Done, except for the one where the user might enter a definition, since the definition doesn't actually exist yet.
Basically did that, but it was word to have , exists, by itself, so I rearranged the sentence.
See if you like what I did for that.
I think we've decided it's optional for role parity.
I don't think we are requiring aria-details, just saying you should use it if the optional thing is there, or a form at least.
Done. |
Ok, looks good to me now! |
Relates to issue #749
A definition should not change the accessible name of a term, and thus aria-labelledby is inappropriate. Rather, a definition is an annotation and should use aria-details.
Preview | Diff