uswds / uswds-site

USWDS website and documentation
https://designsystem.digital.gov
Other
183 stars 140 forks source link

USWDS-Site - Race and ethnicity: Update pattern code #2657

Open amyleadem opened 1 month ago

amyleadem commented 1 month ago

Summary

Updated the race and ethnicity pattern preview and to match the recommendations in SPD 15.

[!Important] This update only includes the changes to pattern preview and code. Additional page content updates will come from https://github.com/uswds/uswds-site/issues/2598. These changes have not yet been incorporated, and this PR should not be merged until they are.

[!Important] We should update the changelog dates before merge.

Related issue

Closes #2651 Related to #2598

Preview link

Race and ethnicity page

Problem statement

Update our race and ethnicity code to match the patterns outlined in USWDS-Site - Enhancement: Update race and ethnicity pattern based on SPD 15

Figure 1: Race and ethnicity question with minimum categories, multiple detailed checkboxes, and write-in response area with example groups:

Screenshot 2024-04-03 at 10 01 26 AM

Figure 2: Race and ethnicity question with minimum categories only, and examples:

Screenshot 2024-04-03 at 10 01 39 AM

Figure 3: Race and ethnicity question with minimum categories only:

Screenshot 2024-04-03 at 10 01 52 AM

Solution

[!Note] This PR uses nested fieldsets in the first pattern variant example. The HTML spec shows that it is ok to nest fieldsets, but there is some concern about how nested fieldsets perform in screen readers like JAWS.

Testing and review

[!note] Review for this will likely come in two phases. In this first phase, I am primarily looking for feedback on the layout and pattern code so that we can be ready to send the component examples on for fed and OMB review. I will continue to revise the template code as the content structure becomes clearer.

General

Accessibility

Confirm these form patterns are compatible with assistive technologies and meet accessibility requirements.

Dev

Confirm the form structure matches our recommended code standards.

Outstanding questions

We will likely need OMB to answer these:

amyleadem commented 4 weeks ago

@amycole501 and @alex-hull could you test the three new race and ethnicity pattern examples for accessibility? There are also a couple of possible enhancements that we could use your input on here and here.