weather-gov / weather.gov

weather.gov 2.0
Other
331 stars 10 forks source link

Make R7 forcast details toggle more accessible #1944

Open eric-gade opened 1 month ago

eric-gade commented 1 month ago

Description

With #1926 and #1943, we implemented a toggle for the daily forecast details, where users can quickly switch between viewing just the table or just the charts (to reduce clutter on the screen).

However, I believe there are a11y problems with the way we've implemented this. For the moment, it is simply a USWDS button group with some javascript that enables the switching of what is displayed. But what we probably want is something more like the WCAG tabs pattern under the hood.

We still want the visual behavior to be the same as in the designs, but we want to ensure that screen reader users can understand what is going on, what is or is not being displayed, and how to switch properly between the displays.

Acceptance criteria

partly-igor commented 1 month ago

Writing down thought so I don't lose it – I wonder if in place of tabs we might use radio buttons, styled as the toggle. The benefit is that it would announce which option is selected and allow for the more default key behavior.

colinmurphy01 commented 3 weeks ago

@eric-gade assigning this to you for this sprint, let us know if you have questions or concerns.

colinmurphy01 commented 1 week ago

This is blocked by #1967