department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
284 stars 206 forks source link

Midpoint Review - Accessibility Feedback - Digital Health Platform, MVP #44231

Open briandeconinck opened 2 years ago

briandeconinck commented 2 years ago

VFS acceptance criteria

Thoughts/questions

Feedback

Must: Unique identifiers for links/buttons. I kind of hinted at this in the meeting but realized afterwards that I didn't really describe it in detail.

Screen reader users often navigate a page by bringing up a list of all the links or buttons on the page and then jumping straight to the one whose name matches what they're looking for. That means the link or button text might be presented without any surrounding context, and so the text should communicate meaning clearly without relying on context.

This will become an issue when multiple devices are available as options. A list of links that all say "Connect" or buttons that all say "Disconnect" doesn't provide enough information for a screen reader user to decide which one to follow. The easiest option is to include extra words in the link and button text (<a href="#">Connect Fitbit</a>). The second easiest option is to include the extra words in a screen-reader-only aria-label (<a href="#" aria-label="Connect Fitbit">Connect</a>).

In the situation where you could have multiple devices of the same type (eg. multiple Fitbits), you'll want to include whatever information is required for the disconnect buttons to have unique accessible names. Something along the lines of:

<button aria-label="Disconnect [Device] [Identifier]">Disconnect</button>, or <button aria-label="Disconnect Fitbit 3">Disconnect</button>.

Should:

Consider:

Data structure. Right now, the device is coded as a card with an h3 heading indicating the device type, roughly like this:

<h3 ...>Fitbit <span ...>- Connected</span></h3>
<button ...>Disconnect</button>

This is valid HTML, and might be a good way of structuring this information. If future iterations include providing additional actions besides connect/disconnect, or include any device metadata, then definitely keep this structure.

But if the only thing being displayed about a device is type, status, and a single connect/disconnect action, then that content is simple enough that you can probably get away with an unordered list. Something like:

<li>
   <span ...>Fitbit</span> <span ...>- Connected</span><br />
   <button ...>Disconnect</button>
</li>

It can still be styled to look like a card, but it might be a smoother interaction pattern for screen reader users. The main advantage is that the list semantics provide summary information for screen reader users, eg. "list, three items" without needing to listen to the full list of device headings.

It's not a change I would insist on and it might not make sense depending on what future iterations look like. Just something to explore!

Platform directions

robbie1226 commented 2 years ago

Thanks for the feedback. Writing to let you know that we applied the "Must" updates to our staging environment.

robbie1226 commented 2 years ago

Thanks for the feedback and for sharing the bug!! Writing to let you know that we applied the "Must" update to our staging environment.