Skip to content

Conversation

@AcesAndEights
Copy link

@AcesAndEights AcesAndEights commented Jul 31, 2019

Добавил role для

  • Block
  • BlockAccordion
  • BlockContent
  • Input
  • Button (brand / simple)
  • CheckboxField
  • Checkbox
  • HeaderMenu
  • HeaderMenuItem
  • BlockLink
  • FileLink
  • Link
  • NavLink
  • LogoBlockLink
  • List
  • List elements
  • Simple Modal
  • Exit simple modal
  • Notice
  • Pagination
  • PaginationLink
  • PasswordField
  • RadioField
  • RadioFieldItem
  • SwitchField
  • Switch

@AcesAndEights
Copy link
Author

@dimonka83 @snoosmoomrik

@AcesAndEights AcesAndEights changed the title [NF] Добавил @role к элементам p.1 🚧 feat: add @role for elements Aug 1, 2019
@AcesAndEights AcesAndEights changed the title 🚧 feat: add @role for elements feat: add @role for elements Aug 6, 2019
@dimonka83 dimonka83 changed the title feat: add @role for elements 🚧 feat: add @role for elements Aug 12, 2019
export const Block: FC<BlockProps> = (props) => (
<Card
role="section"
aria-label="block"
Copy link
Collaborator

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">
Copy link
Collaborator

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}>
Copy link
Collaborator

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',
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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>

Copy link
Collaborator

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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

зачем у текста textbox?

@dimonka83 dimonka83 changed the title 🚧 feat: add @role for elements feat: add @role for elements Aug 3, 2022
@dimonka83 dimonka83 marked this pull request as draft August 3, 2022 04:40
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.

2 participants