Skip to content

[Poetry] Updates Select Poem dropdown to use component library simpleDropdown#70710

Merged
hannahbergam merged 1 commit intostagingfrom
hbergam/spritelab-wcag-label
Feb 11, 2026
Merged

[Poetry] Updates Select Poem dropdown to use component library simpleDropdown#70710
hannahbergam merged 1 commit intostagingfrom
hbergam/spritelab-wcag-label

Conversation

@hannahbergam
Copy link
Contributor

@hannahbergam hannahbergam commented Feb 10, 2026

This is an upgrade to allow a label for screenreaders to correct a WCAG violation.

I initially tried adding a label so I could keep the react-select, but it's unfortunately so outdated that it is not SR compatible no matter what approach you take.

So, I opted at least to make it match our other components from the component library. This has the following disadvantages:

  1. The width is fixed and obscured, so it won't fill the container quite like it used to (and the styles are oldschool in this file, meaning no scss stylesheet to work with)
  2. The dropdown items are using the native select (charcoal instead of white, see video)

However, I still think this is worth it because we're moving in this direction stylistically, and because the accessible experience is improved.

Before:

Screen.Recording.2026-02-09.at.5.25.01.PM.mov

After:

Screen.Recording.2026-02-09.at.5.24.40.PM.mov

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Creation Checklist:

  • Tests provide adequate coverage
  • Privacy impacts have been documented
  • Security impacts have been documented
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Follow-up work items (including potential tech debt) are tracked and linked

@hannahbergam hannahbergam requested a review from a team February 10, 2026 01:36
clearable={false}
searchable={false}
<div style={styles.dropdownWrapper}>
<SimpleDropdown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm noticing that SimpleDropdown doesn't seem to be scrollable. I wonder if this may be an issue for poetry levels with long poem lists on mobile devices.
I see that for Dance (legacy) levels, the SongSelector is scrollable on mobile (checked on my phone!)
I see that they both use native <select> so it seems like there's some styling that's determining this in SimpleDropdown? I wonder if this is intended for SimpleDropdown or not. @moshebaricdo do you have context here?

Copy link
Contributor

@moshebaricdo moshebaricdo Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I'm seeing both use native select as the base, but the legacy implementation is a react select component with bootstrap inspired custom styling for the button trigger and dropdown menu. SimpleDropdown in DSCO uses a fully native approach for the dropdown menu and only applies custom styles to the select element itself (the button trigger).

When we were deciding whether to use a custom dropdown menu styling or go fully native, we opted to go fully native as that is best practice for the most reliable/accessible approach and most flexible as users in any environment will see their OS/browser's native menu—even though it's not as pretty. This is actually better for mobile, as they would see the iOS or android menu when opening the dropdown vs a custom styling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Moshe! So my concern was that for a dropdown with many options, a user could still scroll through entire list on a smaller mobile device. Can you confirm that a user can scroll in SimpleDropdown?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! On an iPad, for example, they'd see iOS's native dropdown which has its own optimizations/styling in place for menus with lots of options vs just a few. That was the primary driver for taking this approach for simple dropdown. I made a super quick codepen experiment to show what this would look like on iOS.

Image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I asked is that locally when I checked out Hannah's branch, when I selected the iPhone view, I saw this dropdown which wasn't scrollable.

Image

However, I found a place where SimpleDropdown is used with a long list - StudentSelector is a student dropdown on teacher dashboard unit page! I logged in on my iPhone, and viewed the list from a section with >30 students and list is scrollable. 🎉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! On an iPad, for example, they'd see iOS's native dropdown which has its own optimizations/styling in place for menus with lots of options vs just a few.

Thanks! I posted my reply above before seeing your latest response. Appreciate the explanation and the check!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of c! My delay was also trying to find a good example I could screenshot on my phone 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you both for the learnings! I agree Alice that I usually test mobile by 'hacking' a mobile view in the browser (which in this case, doesn't quite work)

clearable={false}
searchable={false}
<div style={styles.dropdownWrapper}>
<SimpleDropdown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! On an iPad, for example, they'd see iOS's native dropdown which has its own optimizations/styling in place for menus with lots of options vs just a few. That was the primary driver for taking this approach for simple dropdown. I made a super quick codepen experiment to show what this would look like on iOS.

Image

Copy link
Contributor

@fisher-alice fisher-alice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@hannahbergam hannahbergam merged commit 12678dd into staging Feb 11, 2026
5 checks passed
@hannahbergam hannahbergam deleted the hbergam/spritelab-wcag-label branch February 11, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants