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: (core) Calendar A11y - change ul/li to table with grid #1649

Merged
merged 4 commits into from
Dec 30, 2019

Conversation

JKMarkowski
Copy link
Contributor

@JKMarkowski JKMarkowski commented Nov 21, 2019

Please provide a link to the associated issue.

fixes: #1536

Please provide a brief summary of this pull request.

There is changed the way how we build the calendar month and year components. Also there is changed the way how the models are generated. There is also added one missing aria-live

Please check whether the PR fulfills the following requirements

Documentation checklist:

@JKMarkowski JKMarkowski added the core Core library specific issues label Nov 21, 2019
@JKMarkowski JKMarkowski added this to the sprint 24 - Maester Aemon milestone Nov 21, 2019
@JKMarkowski JKMarkowski added this to In progress in Development via automation Nov 21, 2019
@netlify
Copy link

netlify bot commented Nov 21, 2019

Deploy preview for fundamental-ngx ready!

Built with commit 5fffc75

https://deploy-preview-1649--fundamental-ngx.netlify.com

Copy link

@jacobdevera jacobdevera left a comment

Choose a reason for hiding this comment

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

Nice! Just a couple things needed for a11y.

Also, not related to these changes, I noticed that the aria-label for the dates is set at the <td> level. These should be set at the <span> level. Because it is at the <td> level, both the aria-label and the <span>'s content will be read at once. This can be confusing in certain cases e.g. "1 January 2020 1" will sound like the year 2021 to screen reader users.

@@ -20,6 +20,7 @@
[attr.aria-label]="calendarI18nLabels.monthSelectionLabel"

Choose a reason for hiding this comment

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

The aria-label on the month and year buttons should either be removed or dynamically change depending on the month (e.g. "month selection, January") because it overrides the reading of the button's textContent. Because of this, nothing is currently read out when the month/year changes.

@@ -20,6 +20,7 @@
[attr.aria-label]="calendarI18nLabels.monthSelectionLabel"
[attr.aria-selected]="isOnMonthView()"
(click)="processViewChange('month')"
aria-live="polite"

Choose a reason for hiding this comment

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

Having multiple aria-live can cause conflicts. There should just be one aria-live on a parent element (e.g. the <header> would work).

Development automation moved this from In progress to Review in progress Nov 22, 2019
@jacobdevera
Copy link

Awesome! Something I didn't catch: Disabled dates should have aria-disabled="true" for its <td>

@JKMarkowski
Copy link
Contributor Author

Hello @jacobdevera, thanks for pointing it out :) It helped a lot during implementation. Attribute aria-disabled is added to day's view td.

Copy link

@jacobdevera jacobdevera left a comment

Choose a reason for hiding this comment

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

From an a11y standpoint, the markup is now looking good 👍

Development automation moved this from Review in progress to Reviewer approved Dec 30, 2019
@JKMarkowski JKMarkowski merged commit 6a540c1 into master Dec 30, 2019
Development automation moved this from Reviewer approved to Done Dec 30, 2019
@JKMarkowski JKMarkowski deleted the fix/1536-calendar-a11y branch December 30, 2019 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core library specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Calendar markup for a11y
4 participants