storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.64k stars 9.31k forks source link

Feature request: a11y - show population pourcentage in Accessibility Addon #15866

Closed Aarbel closed 2 years ago

Aarbel commented 3 years ago

Color-blinded Population pourcentage should be shown in Accessibility plugin.

Why ? To see if we test accessibility with a big pourcentage of color-blinded population, or people with low vision.

For example:

image

Aarbel commented 3 years ago

Links

- Normal Vision - 92%
- Deuteranomaly - 2,7%
- Protanomaly - 0,66%
- Protanopia - 0,59%
- Deuteranopia - 0,56%
- Tritanopia - 0,016%
- Tritanomaly - 0,01%
- Achromatopsia - 0,0001%
- Achromatomaly - 0,00001%
Aarbel commented 3 years ago

Can't find metrics about blurred or low vision vision, if someone can help me

cf https://webaim.org/articles/visual/lowvision

uncorrected refractive errors
cataract
age-related macular degeneration
glaucoma
diabetic retinopathy
corneal opacity
trachoma
Aarbel commented 3 years ago

Code to edit: https://github.com/storybookjs/storybook/blob/07c8974649e0fa95ce1fe8e1b8a0e553754bbdb0/addons/a11y/src/components/VisionSimulator.tsx

To obtain something like this (maybe sorting them by pourcentage would be great) image

Aarbel commented 3 years ago

@maya maybe you can help ?

shilman commented 3 years ago

cc @MichaelArestad

Aarbel commented 3 years ago

@MichaelArestad @maya any help / news about it ?

MichaelArestad commented 3 years ago

@Aarbel Thanks for proposing this! In the screenshot above, where the percentages are next to the modes, it is not immediately clear to me what the percentages represent. I don't have any ideas for ways to include this information yet, but I will be thinking about it as I work on the accessibility addon.

It would be good if we could get this data via an API so it will remain updated.

Aarbel commented 3 years ago

@MichaelArestad i agree that in term of ui a text like "Deuteranomaly (2,7% of users)" would be better, but quite redundant with all dropdown items. That's just a UI detail anyway, before that "Deuteranomaly" has first nos sense for most users.

About API: i don't know an api that gives this "vision" metrics updated. We will surely have to update it every 5 years from Wikipedia, with certainly little variations. Not so a big maintance thing.

The only data i'm missing is the population percentage of low vision, cf https://github.com/storybookjs/storybook/issues/15866#issuecomment-900524401

jsomsanith commented 2 years ago

Hey everyone, What about this mockup ?

image

Agree that this is not some critical info that changes everytime, and an update maintenance each year doesn't cost anything instead of getting it from api

MichaelArestad commented 2 years ago

@jsomsanith I dig this mockup! I might change it to 2,7% of users (no "the")

jsomsanith commented 2 years ago

👍 I can remove the the If the visual is ok, I can work on a PR

Aarbel commented 2 years ago

@jsomsanith for blurred vision (mainly myopa):

22.9%

https://www.aaojournal.org/article/s0161-6420(16)00025-7/pdf#:~:text=We%20estimated%201406%20million%20people,e%206.3%25%5D)%20in%202000.

Aarbel commented 2 years ago

🙌

shilman commented 2 years ago

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-rc.0 containing PR #18003 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease