As discussed here #849926-71: links wrapped in .contextual-links-wrapper divs are not accessible at all via keyboard alone also problems with screen readers - VoiceOver doesn't tell you what block you are editing because the title is not included in the link.

Rather than simply outputting "Open configuration options button", it should "Open configuration options button for Tools block" or "Open configuration options button for Search block".

This will make it easier for people to know they are editing the right block.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plopesc’s picture

Status: Active » Needs review
FileSize
1.35 KB

Attaching patch that adds block id to the contextual message.

Maybe it could take the block title from <h2>, but this value is not always available.

What do you think?

Regards

mgifford’s picture

If you can pull it from the H2 that would be better for sure. The block-search is pronounced and it helps, but there may be some other machine readable names that are just going to cause grief.

It should be a minority of the time that the H2 isn't available. It will be invisible a bunch of the time, but that's fine as far as the code goes.

I don't think there would need to be a fail-over where if the H2 isn't present the machine name is read out.

@plopesc can you roll up the next patch with that change? Thanks!

EDIT: Oh ya, I was testing in Safari with VoiceOver.

plopesc’s picture

Hello

Attaching patch taking block name from H2 as you requested.

Regards.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
92.54 KB

Assuming the bot agrees, this works much better with VoiceOver. I'm quite happy that this is pulling the titles for the blocks and providing context! Thanks @plopesc

Wim Leers’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.38 KB

Minor improvement to #3, which brings modified $(selector, $context) to $context.find(selector), in line with other D8 JS :)

#4: please double-check that I didn't break anything.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

Tested it again and it's fine. Thanks Wim!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks!

mgifford’s picture

Issue tags: +Accessibility

Thanks @Dries & @plopesc!

I'm just tagging this as I'm realizing only now that it wasn't put in the accessibility group.

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