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

react-a11y DayPicker warning #386

Closed
reintroducing opened this Issue Jun 10, 2017 · 6 comments

Comments

2 participants
@reintroducing

reintroducing commented Jun 10, 2017

I'm working on a project where accessibility is a requirement and I just integrated DayPicker into the fold. I'm using react-a11y to warn me of any possible issues I may run into/omit to make sure I am not forgetting accessibility when developing my components. I'm seeing this pop up now:

DayPicker You have an unlabeled element or control. Add `aria-label` or `aria-labelledby` attribute, or put some text in the element.

I can't for the life of me figure out where its coming from or how to resolve it. I'm not using any fancy implementation of DayPicker, just pretty standard stuff:

<DayPicker
     selectedDays={this._modifierSelected}
     disabledDays={this._modifierDisabled}
     onDayClick={this._onDaySelected}
     fromMonth={fromMonth}
     toMonth={toMonth}
     initialMonth={initialMonth}
     weekdaysShort={this._weekdayTitles}
     navbarElement={<DatePickerCalendarNavigation />}
     enableOutsideDays
 />

Any help would be greatly appreciated.

@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Jun 10, 2017

Owner

Thanks for the report! Which version of react-a11y are you using?

Owner

gpbl commented Jun 10, 2017

Thanks for the report! Which version of react-a11y are you using?

@gpbl gpbl closed this Jun 10, 2017

@gpbl gpbl reopened this Jun 10, 2017

@reintroducing

This comment has been minimized.

Show comment
Hide comment
@reintroducing

reintroducing Jun 10, 2017

I'm using react-a11y v0.3.3 which seems to be the latest.

reintroducing commented Jun 10, 2017

I'm using react-a11y v0.3.3 which seems to be the latest.

@gpbl gpbl added this to the v5.6.0 milestone Jun 12, 2017

gpbl added a commit that referenced this issue Jun 12, 2017

Remove role="gridcell" from non interactive day
See http://rawgit.com/w3c/aria/master/aria/aria.html#gridcell: “A gridcell may be focusable, editable, and selectable.” (#386)
@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Jun 12, 2017

Owner

I've found the reason of this warning: when the days outside the current month are not shown, we are still adding role="gridcell". However:

A gridcell may be focusable, editable, and selectable.

which is clearly not the case – removing the role attribute won't make react-a11y to warn. Thanks for reporting this!

Owner

gpbl commented Jun 12, 2017

I've found the reason of this warning: when the days outside the current month are not shown, we are still adding role="gridcell". However:

A gridcell may be focusable, editable, and selectable.

which is clearly not the case – removing the role attribute won't make react-a11y to warn. Thanks for reporting this!

@gpbl gpbl closed this in #394 Jun 12, 2017

@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Jun 12, 2017

Owner

(the fix will be published to the upcoming release)

Owner

gpbl commented Jun 12, 2017

(the fix will be published to the upcoming release)

@gpbl gpbl added the bug:minor label Jun 12, 2017

@reintroducing

This comment has been minimized.

Show comment
Hide comment
@reintroducing

reintroducing Jun 12, 2017

Great, thanks for the quick turn around, really appreciate your work on this component. It's fantastic and I use it in multiple projects (not all needing this level of accessibility) :).

reintroducing commented Jun 12, 2017

Great, thanks for the quick turn around, really appreciate your work on this component. It's fantastic and I use it in multiple projects (not all needing this level of accessibility) :).

@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Jun 17, 2017

Owner

Thanks @reintroducing for the nice words! The change has been published in v6.0.0 (changelog) 🎉

Owner

gpbl commented Jun 17, 2017

Thanks @reintroducing for the nice words! The change has been published in v6.0.0 (changelog) 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment