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(calendar): Enhance accessibility by adding visually hidden text … #940

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

mryunt02
Copy link
Contributor

@mryunt02 mryunt02 commented Oct 15, 2024

Changes

  • Added visually hidden text to the navigation buttons for improved accessibility:
    • <span class="visually-hidden">Previous Calendar View</span> was added to the previous button.
    • <span class="visually-hidden">Next Calendar View</span> was added to the next button.

CSS

  • Added the following CSS class to hide the text visually while keeping it accessible to screen readers:
    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }

Related Issue

Fixes #939

Copy link
Collaborator

@erbilnas erbilnas left a comment

Choose a reason for hiding this comment

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

Thank you so much for this finding about accessibility 🙏 Setting the label attribute for bl-button works simply fine—no need to add an extra class. Example: Icon-Only Buttons

@erbilnas
Copy link
Collaborator

Also, if you could apply the same for other buttons, we’d really appreciate it! 🧡

erbilnas
erbilnas previously approved these changes Oct 17, 2024
@buseselvi buseselvi merged commit aacd375 into Trendyol:next Oct 21, 2024
5 checks passed
@mryunt02 mryunt02 deleted the feature/a11y-calendar-buttons branch October 21, 2024 12:05
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.

[Feature Request]: <Enhance Calendar Accessibility>
4 participants