What fresh hell is THIS now? - Patrick Lauke
[chris__pearce] @dave_or_dead did you get anywhere with your table interaction? Seems a tricky thing to do.
I had a quick play writing some markup (emphasis “quick”) and came up with this:
<tr> <td> <button aria-expanded="false" aria-controls="1 2" type="button" > Expand nested rows </button> <span id="0"> Some text </span> </td> <td> Some data </td> <td> Some data </td> <td> Some data </td> </tr> <tr aria-hidden="true" id="1" > <td> <span aria-labelledby="0"> Some data </span> </td> <td> Some data </td> <td> Some data </td> <td> Some data </td> </tr> <tr aria-hidden="true" id="1" > <td> <span aria-labelledby="0"> Some data </span> </td> <td> Some data </td> <td> Some data </td> <td> Some data </td> </tr> </table>
Not sure about aria-labelledby
usage? Perhaps hidden visually text within the first <td>
of the nested rows that covers the relationship? And setting focus to a natively focusable element in the first <td>
of the first nested row (or whatever makes sense or the <td>
itself), when the rows are expanded (visible)?
Not tested at all and not sure if that’s the right way to go about it? I am curious as to what is the right way though, as it is something that crops up a lot in application UI’s whether or not it's good UX.
aria-labelledby
isn’t the right one to use here since (if it were to work) it would be read instead of whatever was inside
aria-describedby
is better for this https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute
[karlgroves] >it would be read instead of whatever was inside
Kudos. That’s a big concern whenever using aria-label/ aria-labelledby. Visible text is preferred, when possible, for usability by the broadest user spectrum
aria-describedby
and good to know @karlgroves.
[muan] Hi! I understand that sometimes people navigate from a list of links, so link purpose being understandable by itself it’s very important, so I’m wondering in the case of issue list:
<li><a href=”{issue_url}”>Submit button not clickable in settings form</a><a href=”{label_url}” class=”label”>bug</a></li>
Would it be recommended to label the “bug” link? either with title
or aria-label
?
label
bug
aria-label
–we just had this conversation yesterday if you scroll up a bit. Without the element being interactive the aria-label
will not be exposed as an accessible name. tabindex
alone is not enough to make it interactive, it also has to be paired with an interactive role like button
aria-label
to have it read out: aria-label="Label: bug"