Skip to content

fix(a11y): fixed accessibility in notifications#380

Merged
PosikBoy merged 7 commits into
mainfrom
fix-accessibility-in-notifications
May 26, 2026
Merged

fix(a11y): fixed accessibility in notifications#380
PosikBoy merged 7 commits into
mainfrom
fix-accessibility-in-notifications

Conversation

@PosikBoy
Copy link
Copy Markdown
Contributor

Closes #379

@gravity-ui-bot
Copy link
Copy Markdown
Contributor

Preview is ready.

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented Apr 24, 2026

The notification's content can now overlap with side actions — needs fixing

изображение

Here's the main branch version:

изображение

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented Apr 24, 2026

The side actions became misaligned in the top placement — needs fixing

изображение

Here's the main branch version:

изображение

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented Apr 24, 2026

There's a redundant top border if there's no unread notification above now — needs fixing

изображение

Here's the main branch version

изображение

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented May 20, 2026

The redundant border problem persists

изображение

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented May 20, 2026

There's an eslint warning — needs fixing

изображение

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented May 25, 2026

Hm, this looks weird...
Hovering on one notification hides the borders
Hovering on another doens't hide the borders

Screen.Recording.2026-05-25.at.16.25.15.mov

You probably forgot to add some selector in css

@PosikBoy
Copy link
Copy Markdown
Contributor Author

I agree, it looks weird. The same behaviour appears in the main branch. I suppose we should remove hiding borders while hovering, but we probably need to clarify this with the designer first.

@Ruminat
Copy link
Copy Markdown
Contributor

Ruminat commented May 25, 2026

The same behaviour appears in the main branch

Oh, true...
In the first iteration of Notifications it wasn't the case
I guess it broke some time after

All right then, this needs fixing in a different PR I suppose

Let's fix the other issues and merge this PR then

@PosikBoy
Copy link
Copy Markdown
Contributor Author

PosikBoy commented May 25, 2026

The same behaviour appears in the main branch

Oh, true... In the first iteration of Notifications it wasn't the case I guess it broke some time after

All right then, this needs fixing in a different PR I suppose

Let's fix the other issues and merge this PR then

all other issues are closed, so can we merge?


&__actions {
&__left {
position: absolute;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's not use position: absolute where we can avoid it
It leads to problems like z-index conflicts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about this?

height: 36px;
}

&__visually-hidden {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks way too complex
Do we really need it?
Dosn't title attribute solve this?
Or what is this used for?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about this?

onMouseLeave={notification.onMouseLeave}
onClick={handleLinkClick}
className={clickableClassName}
onClick={notification.onClick as React.MouseEventHandler<HTMLAnchorElement>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need this as

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about this?

<button
type="button"
className={clickableClassName}
onClick={notification.onClick as React.MouseEventHandler<HTMLButtonElement>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need this as

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about this?

@PosikBoy PosikBoy merged commit 92c021b into main May 26, 2026
4 checks passed
@PosikBoy PosikBoy deleted the fix-accessibility-in-notifications branch May 26, 2026 10:10
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.

Poor notification accessibility

3 participants