avatar
🌶️ - J Neathawk @knighthawk0811.bsky.social

here is how Mozilla is doing it. they put a hidden line of text inside the button with a written description of what it does.

image
feb 12, 2025, 1:20 pm • 0 0

Replies

avatar
⭑ salma @whitep4nth3r.com

Yeah I don't need to do that as I like to keep the text on the button. I'm wondering how best to associate each button with the code snippet.

feb 12, 2025, 1:23 pm • 0 0 • view
avatar
🌶️ - J Neathawk @knighthawk0811.bsky.social

check out the doc on aria-controls, i think that's the one you want

feb 12, 2025, 1:33 pm • 0 0 • view
avatar
Eric Bailey @ericwbailey.website

aria-controls has next to no support in the actual. Other strategies are recommended here.

feb 12, 2025, 3:22 pm • 1 0 • view
avatar
🌶️ - J Neathawk @knighthawk0811.bsky.social

she's already done one strategy by placing actual text in the button describing its function. the other commented thing here is aria-describedby but that's intended to be a more verbose version of aria-labeledby. neither of which tell of any action like aria-controls does

feb 12, 2025, 4:02 pm • 0 0 • view
avatar
🌶️ - J Neathawk @knighthawk0811.bsky.social

having low support doesn't make it wrong, it means those supposed to do the support are lacking. there's always a choice of how much and how far to go. between the added text and the aria-controls anything further is overkill and possibly enabling future lack of support by creating less demand

feb 12, 2025, 4:02 pm • 0 0 • view
avatar
🌶️ - J Neathawk @knighthawk0811.bsky.social

but it's a button and this is a descriptor, at some point we're literally arguing semantics... which is good but I've likely already gone farther than i should

feb 12, 2025, 4:02 pm • 0 0 • view
avatar
Eric Bailey @ericwbailey.website

I am commenting on it because this is a public context, and that folks less familiar with it may extrapolate on its functionality based on your comments, and then use it without testing.

feb 12, 2025, 4:07 pm • 0 0 • view