Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: aria-label и role у компонентов #1611

Merged
merged 35 commits into from May 31, 2021

Conversation

eugpoloz
Copy link
Contributor

  • Добавила aria-метки и роли там, где они нужны, в компонентах и в документации,
  • Изменила некоторые div на более подходящие теги.

@eugpoloz eugpoloz requested a review from ArthurStam May 19, 2021 14:05
@eugpoloz eugpoloz requested a review from a team as a code owner May 19, 2021 14:05
@github-actions
Copy link
Contributor

github-actions bot commented May 19, 2021

size-limit report 📦

Path Size
JS 46.53 KB (+0.59% 🔺)
JS, unstable 11.27 KB (-0.32% 🔽)
CSS 27.46 KB (+0.17% 🔺)
CSS, unstable 547 B (0%)

@github-actions
Copy link
Contributor

👀 Styleguide deployed

See the styleguide for this PR at https://vkcom.github.io/VKUI/pull/1611/

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 19, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 59662f0:

Sandbox Source
VKUI - default example Configuration

@github-actions
Copy link
Contributor

github-actions bot commented May 19, 2021

Warnings
⚠️

1 changed screenshots found — review & update them via "Update Screenshots" action before merging.

Changed screenshots

banner-android-bright_light-1

Code coverage

lines2135 / 360759.19%
statements2177 / 368659.06%
functions486 / 79760.98%
branches1273 / 283844.86%

Generated by 🚫 dangerJS against a3928d0

src/components/Banner/Banner.tsx Outdated Show resolved Hide resolved
src/components/Banner/Banner.tsx Outdated Show resolved Hide resolved
src/components/Cell/Cell.tsx Outdated Show resolved Hide resolved
src/components/Checkbox/Checkbox.tsx Outdated Show resolved Hide resolved
src/components/Chip/Chip.tsx Outdated Show resolved Hide resolved
src/components/PanelHeaderBack/PanelHeaderBack.tsx Outdated Show resolved Hide resolved
src/components/PopoutWrapper/PopoutWrapper.tsx Outdated Show resolved Hide resolved
src/components/Progress/Progress.tsx Outdated Show resolved Hide resolved
src/components/PullToRefresh/PullToRefreshSpinner.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@ArthurStam ArthurStam left a comment

Choose a reason for hiding this comment

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

В PR довольно много мест, где aria-label зашит внутри компонента без возможности его переопределить. Учитывая, что наши приложения переводятся на разные языки, мы не можем себе такой хардкод позволить.

Поэтому я предлагаю компоненты вроде Checkbox, Search и Cell фиксить отдельно в рамках нашей задачи по доступности. У react-aria есть специальные хуки для большинства кейсов. И эта либа так же решает проблему локализации.

@eugpoloz eugpoloz force-pushed the feature/vkui-51/aria-label branch 4 times, most recently from 29b35bb to 7c99a85 Compare May 25, 2021 13:19
@eugpoloz eugpoloz requested a review from ArthurStam May 25, 2021 13:57
src/components/Root/Root.tsx Outdated Show resolved Hide resolved
src/components/UsersStack/UsersStack.tsx Show resolved Hide resolved
src/components/UsersStack/UsersStack.tsx Show resolved Hide resolved
src/components/WriteBarIcon/WriteBarIcon.tsx Outdated Show resolved Hide resolved
@eugpoloz eugpoloz force-pushed the feature/vkui-51/aria-label branch from dcc3458 to b7fa920 Compare May 31, 2021 07:48
@eugpoloz eugpoloz requested a review from ArthurStam May 31, 2021 08:25
ArthurStam
ArthurStam previously approved these changes May 31, 2021
@eugpoloz eugpoloz merged commit b79a13b into master May 31, 2021
@eugpoloz eugpoloz deleted the feature/vkui-51/aria-label branch May 31, 2021 10:02
@alekssamos
Copy link

А посмотрите, пожалуйста, как можно исправить подобные случаи? Приложение Люди рядом (userlocation), около имени и фамилии есть значок отправить уведомление. Он никак в отдельную кнопку не выделяется и даже клавиатурный фокус на неё не попадает.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants