-
Notifications
You must be signed in to change notification settings - Fork 28
feat: add @role for elements #190
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
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # packages/desktop/src/list/List.tsx # packages/mobile/src/list/List.tsx
| export const Block: FC<BlockProps> = (props) => ( | ||
| <Card | ||
| role="section" | ||
| aria-label="block" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Атрибут aria-label создаёт текстовую метку текущего элемента в случае отсутствия видимого текста описания элемента. зачем тут просто block всегда?
|
|
||
| return ( | ||
| <Flex wrap="wrap"> | ||
| <Flex wrap="wrap" role="section" aria-label="grid"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
есть роль grid и опять label один для всех и не понятно зачем он тут
| color = '#000', | ||
| }) => ( | ||
| <Svg width={size} height={size} viewBox="0 0 24 24" focusable="false"> | ||
| <Svg width={size} height={size} viewBox="0 0 24 24" focusable="false" role="img" alt={name}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
как я понял тут aria-label нужен, а не alt
| onBlur: props.onBlur, | ||
| onKeyDown: props.onKeyDown, | ||
| onKeyUp: props.onKeyUp, | ||
| role: 'textbox', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
перед хендлерами
| onFocus?: () => void | ||
| onBlur?: () => void | ||
| href?: string | ||
| title?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зачем?
| transition?: string | ||
| transform?: string | ||
| transformOrigin?: string | ||
| alt?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
как выше писал, возможно aria-label, а не alt
|
|
||
| export const BlockAccordion: FunctionComponent<BlockAccordionProps<BlockAccordionItemModel>> = ({items, indent = 'm', tabIndex = 0, opened, onChange}) => ( | ||
| <AccordionControl<BlockAccordionItemModel> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лишняя строчка
| export const Text: FunctionComponent<TextProps> = ({display, compact, size, bold, color, decoration, transform, transition, align, clamp, children}) => ( | ||
| <Typo | ||
| as="span" | ||
| role="textbox" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зачем у текста textbox?
Добавил role для