About “best practices”
2 hours agoNewsyatil.net

In brief

  • The author says best practice began as a way to suggest fixes for accessibility barriers that do not technically fail WCAG.
  • The author says best practices are techniques that meet current technology and understanding, and that most of them exceed WCAG.
  • For an element without an accessible name, the author's go-to technique is the label element, which has the fewest downsides.

Why it's worth reading: It clarifies the difference between WCAG failures and recommended techniques, helping designers and reviewers prioritise fixes.

Summary by Mosaic, Designed's AI · may contain mistakes

Craig Abbott wrote about the term “best practice” today. Thanks to posting his thoughts on Mastodon, I had time to kick my brain into gear and think about the topic myself.

The first thing I noticed when reading his piece is that how he experienced the term is different from how I have. Which means we’re off to a good start. 😃

Like most things, the term [best practice] started off with good intentions. A way to suggest fixes for things which are definitely accessibility barriers, but don't technically fail the Web Content Accessibility Guidelines (WCAG), or whatever standard you're auditing against.

Craig Abbott, "Best practice" is just your opinion

This is not how I have ever seen the term “best practice” used, and I would be as upset as Craig if I did see it used this way.

You cannot fail websites and apps because they don’t meet your personal “best practice”. Best practices to me are techniques that meet the current level of technology and understanding. These techniques are used to meet WCAG success criteria. Most best practices will exceed WCAG.

Let’s look at this concrete code sample:

This fails several WCAG success criteria, but the most obvious is that the <input> element has no accessible name[^ A 4.1.2 Name, Role, Value violation.], so let’s focus on that.

A technique to make sure that the <input> element has an accessible name is to add an aria-label attribute:

That meets the success criterion, but it is not what I would generally recommend because it has some drawbacks:

aria-label is often not translated when using in-browser translation.

The value of aria-label can easily be overlooked when copying and pasting code to generate new, similar interfaces. That’s a future accessibility risk.

In some screen reader/browser combinations, the aria-label will be announced in the browser language, not in the website language.

SystemsAccessibility

0 Comments

Sign in to join the discussion.

Be the first to comment.

← Back to Designed News