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(Sheet): add aria attributes #1555

Merged
merged 2 commits into from
Apr 27, 2024
Merged

feat(Sheet): add aria attributes #1555

merged 2 commits into from
Apr 27, 2024

Conversation

mournfulCoroner
Copy link
Contributor

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@mournfulCoroner mournfulCoroner changed the title feat(Sheet): add aria attrs feat(Sheet): add aria attributes Apr 27, 2024
<div
ref={this.veilRef}
className={sheetBlock('veil', veilTransitionMod)}
onClick={isAnimating ? undefined : this.onVeilClick}
onTransitionEnd={this.onVeilTransitionEnd}
role="presentation"
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to specify this. div has no semantics, and hasn't contain any children

Copy link
Contributor Author

@mournfulCoroner mournfulCoroner Apr 27, 2024

Choose a reason for hiding this comment

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

Thank you for information!
But I don't know how to avoid eslint-disable-next-line jsx-a11y/click-events-have-key-events because this div must be clickable. Maybe I could rewrite the component as a functional and use the useLayer instead of the usual handler? I also think it would be nice to add FocusTrap to the sheet content

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see, then let's keep it

@amje amje merged commit b71ea01 into main Apr 27, 2024
5 checks passed
@amje amje deleted the feat-sheet-add-aria-attrs branch April 27, 2024 18:38
Arucard89 pushed a commit that referenced this pull request May 8, 2024
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.

3 participants