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

fix: focus lost when navigation button is disabled #2685

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gpbl
Copy link
Owner

@gpbl gpbl commented Feb 16, 2025

Fixes issue #2630 by replacing the disabled attribute with aria-disabled, to prevent the focus loss when navigating to the last month.

After some research, I believe this change won’t cause any other accessibility issues.

Breaking change (style): This change may affect the style of those who rely on the [disabled]/:disabled CSS selectors. To fix this, use aria-disabled instead.

- .rdp-button_next[disabled="true"],
- .rdp-button_next:disabled,
+ .rdp-button_next[aria-disabled="true"],
- .rdp-button_previous:disabled,
- .rdp-button_previous[disabled="true"],
+ .rdp-button_previous[aria-disabled="true"] {
   /* Existing custom style */
}
2025-02-16.18.30.02.mov

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.

Current focus can be lost if next or previous month buttons become disabled
1 participant