RockefellerArchiveCenter / styles

Style Library for the Rockefeller Archive Center
https://styles.rockarch.org
MIT License
0 stars 1 forks source link

Add storybook select component #22

Closed HaSistrunk closed 3 years ago

HaSistrunk commented 3 years ago

Select and associated options, which have been implemented in dimes forms (see Inputs component) and Aurora.

helrond commented 3 years ago

So I'm noting that in DIMES we implemented selects as a ul but in Aurora and the Library website it's a more traditional select. IIRC the reasons for doing what we did in DIMES had to do with accessibility. Any thoughts on preferred HTML encoding?

HaSistrunk commented 3 years ago

I think it had to do with styles - it's complicated to implement custom styling for the options in a select, so instead we used that existing downshift component in DIMES that used a button and the ul approach. Both are accessible, but the <select> element is accessible with less futzing.

(notice in the library site we used select and just didn't customize the option styles)

helrond commented 3 years ago

Ah, that's right, thanks for reminding me! I think I'll just do the basic select then and we can amplify if we need to later.