Problem/Motivation

Follow-up to #3013770: Distinguish between the repeated text of buttons in Layout Builder UI.
Basically the same issue, to catch some "remove section" buttons we missed there.

Proposed resolution

Give all of the "remove section" buttons a unique accessible name... e.g. "Remove section 2".

CommentFileSizeAuthor
#3 3013770-3.patch845 bytestedbow

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

tedbow’s picture

Status: Active » Needs review
StatusFileSize
new845 bytes

Status: Needs review » Needs work

The last submitted patch, 3: 3013770-3.patch, failed testing. View results

tedbow’s picture

Status: Needs work » Needs review

#4 was unrelated failure. Passed on retest.

andrewmacpherson’s picture

Status: Needs review » Needs work

We don't need the span.visually-hidden here for the section number, because the entire text "remove section" is already visually hidden by .layout-section .remove-section { text-indent: -9999px; }.

tim.plunkett’s picture

That's a design choice which could always change. Unless there's a problem from those two conflicting, I'd rather be clear about which part should always be visually hidden vs the whole thing happening to be hidden for now.

tedbow’s picture

Also a front-end theme could choose to show the labels

andrewmacpherson’s picture

Status: Needs work » Reviewed & tested by the community

Unless there's a problem from those two conflicting,

There isn't a conflict, it's just overkill to hide something, then hide it again. I thought this was excess code that could do with being tidied up. Patch #3 is safe. Happy to say RTBC.

That's a design choice which could always change. [...] the whole thing happening to be hidden for now

Are we planning to change it? A visible text label has several benefits over an icon only, but we can do that in a follow-up.

The problem addressed in this issue is: make the purpose clear to screen reader users who don't perceive the visual/spatial relationship of the button to the section.

I'd rather be clear about which part should always be visually hidden

Ah, now there's a misconception. Basically, that's framing it the wrong way around. There's no part of the accessible name which "should always" be visually hidden. Anyone can benefit from the whole name.

Visually hidden text is a common accessibility practice, but it's not a desirable thing in it's own right. Rather, it's an awkward compromise to meet the needs of screen reader users, while aiming for brevity in the visual UI design. Done badly, it can make things worse for speech control users, and it can somtimes pose challenges for translators too. If you can satisfy the needs of screen reader users without resorting to visually hidden text, so much the better.

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

Committed and pushed 23d304ffd8 to 8.7.x and 83dfb0a02c to 8.6.x. Thanks!

This feels like an accessibility bug rather than a task.

  • alexpott committed 23d304f on 8.7.x
    Issue #3015004 by tedbow, andrewmacpherson, tim.plunkett: Distinguish...

  • alexpott committed 83dfb0a on 8.6.x
    Issue #3015004 by tedbow, andrewmacpherson, tim.plunkett: Distinguish...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.