There are 2 accessibility issues that needs to be looked at. I included a patch that attempts to fix both.

Section wrapper

Wetkit_bootstrap is using <div> instead of <section>.

When looking at the official WET-BOEW Alerts documentation: http://wet-boew.github.io/wet-boew-styleguide/v4/design/alerts-en.html

The Alerts are wrapped in <section> element. This is essential because the alerts include a H4 that can be displayed before the H1 on the page.

Close button

While not part of WET-BOEW, the ability to dismiss a message box via the X is useful but has been reported to case accessibility issues.

There is a “X” that closes the “Attention” message. The “X” is identified as “a link” with NVDA and “link TIMES” with JAWS 16, the alt text should be more descriptive for the screen reader user. CEA recommends for example: “Close attention message” would be more appropriate.
Source code: ×

Status message

WCAG 2.0 Reference:
1.1.1 Non-Text Content
3.3.2 Labels or Instructions

I'm unsure if this is the best way to do it but the patch adds an aria-hidden="true" to the close link for screen readers to simply ignore it.

Other possibility

We could also provide a title attribute that dynamically reflect the header of this box (To avoid repeating the same title on multiple alert boxes on the same page).

Thoughts?

Comments

ptsimard created an issue. See original summary.

ptsimard’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.13 KB
ptsimard’s picture

Issue summary: View changes
sylus’s picture

This looks good to me!

We definitely should adhere to wet-boew and leverage section instead of the default.

As for the aria-hidden="true" I am not sure either what the best approach would be. I don't mind just hiding it since is just an quick dismiss toggle for a message that will disappear on page refresh.

Maybe add this one for now ^_^

sylus’s picture

Committed and attributed!

Thanks for the accessibility improvements!

sylus’s picture

Status: Needs review » Fixed

  • sylus committed 4e2f0ae on 7.x-4.x authored by ptsimard
    Fixed WetKit Bootstrap for Issue #2705737 by ptsimard: Accessibility...

Status: Fixed » Closed (fixed)

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