Found in the wild:

```
<a href=""
role="button"
aria-controls="drawer-detail"
id="drawer-card-animal-kingdom-link"
aria-expanded="false"
aria-label="Read More - <strong>Disney’s Animal Kingdom Theme Park</strong>">
Read More
</a>
```

Yes, that is a `<strong>` element *stuffed* into an `aria-label`.

Tell me you never fired up a screen reader without… nevermind.

@aardrian is that even remotely valid html??? surely even commonly used frontend development tools would have highlighted that as invalid.

@r343l Likely the brackets are drawn as character entities, but the browser has rendered them in the inspector (it does that). Since the content is generated by JS, I cannot see the raw source without listening to the data stream and meh.

But if those were entities, then totally valid HTML.

Just very problematic ARIA use and annoying UI.

@aardrian Ahh I suppose that could be. I don’t even hardly know the right way to do things anymore and lots of html just looks absurdly weird to me and this one was already doing the “make <a> into a button-as-role thing” that always seems unnecessary when I’ve noticed it.
@r343l It is always unnecessary and rarely has all the keyboard support needed.
@r343l @aardrian I don't see why it would be invalid actually. The `<` has no special meaning inside an attribute value though, obviously.
Adrian Roselli (@[email protected])

@[email protected] Likely the brackets are drawn as character entities, but the browser has rendered them in the inspector (it does that). Since the content is generated by JS, I cannot see the raw source without listening to the data stream and meh. But if those were entities, then totally valid HTML. Just very problematic ARIA use and annoying UI.

Toot Café

@aardrian @r343l I mean, even without entity references it'd be valid: https://html.spec.whatwg.org/multipage/syntax.html#syntax-attribute-value

(plain wrong et al. of course, but valid)

HTML Standard

@aardrian I was facepalming at the a[role="button"] already, but the strong inside the label just killed me.
@Stephanie The `aria-expanded` is the cherry on top.
@aardrian An internal system at our uni (for laundry management) has <br> inside alt attributes. I can see how this happened, there’s a page that shows laundry machine availability, where machines are represented by some kind of icons, and a textual tooltip with more detailed information appears on hover. The contents of that tooltip are used as alt text, but somebody forgot to strip out the HTML tags.
@miki Startlingly common, IME. Which is unfortunate since devs can strip / replace that with built-in features of their tooling.
@aardrian At that same uni, there’s also what we call the “queuing system”, which is essentially a system for booking appointments. You get permission to book a slot for a specific activity, and can then pick an appropriate date and time by clicking on the calendar. Everything is labeled properly, except somebody forgot to format the timestamp in the label, and what you get as a screen reader user is the number of seconds since epoch. This information is practically useless even if you know what it means and can parse it manually, as you don’t know whether the timestamp is in UTC (as it should be), or in the Europe/Warsaw timezone, which is close enough to UTC for the timestamps to make sense either way. I had to confirm this with a sighted person, and it was the latter if I remember correctly.
@aardrian And then there’s the HR system, for requesting paid leave and such, which uses UserWay for no reason and generates image PDFs that can’t be OCRed effectively.
@miki Well, there is your reason — to falsely claim UserWay has it handled!
@aardrian Probably. THe problem is, the system, at least from a screen-reader perspective, is pretty much accessible, if not for the PDF reports which UserWay couldn’t do anything about, even if it wanted to. They don’t actually have to claim anything because the job was clearly done, and it’s definitely not what I call “accidental accessibility"