Skip to content

Conversation

@vbergeron-ls
Copy link

@vbergeron-ls vbergeron-ls commented Feb 9, 2026

GOLF-3068

This PR adds:

  • Aria level to the month header of the datepicker
  • Aria labels to the arrow buttons of the datepicker, defaulting to "previous" and "next" when the new config options exposed for these are not specified.

No more role=heading and aria level
image

Aria labels passed as options
image

No aria label passed
image

<th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>
<th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>
<th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1" aria-label="{{::previousButtonLabel}}"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">{{::previousButtonLabel}}</span></button></th>
<th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-level="5" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>
Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure about using an aria-level of 5 here now that we don't even have the chronogolf context... I will investigate removing the heading role or alternative solutions.

Copy link
Author

Choose a reason for hiding this comment

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

Removed aria level and heading, confirmed no major change to css

@vbergeron-ls vbergeron-ls changed the title chore(build): add aria labels and aria level feat(datepicker): add aria labels and aria level Feb 9, 2026
@vbergeron-ls vbergeron-ls force-pushed the golf-3068-add-aria-labels-and-level-to-datepicker branch from 5332088 to ec3b34b Compare February 11, 2026 20:31
@ls-michael-smith ls-michael-smith self-assigned this Feb 12, 2026
Copy link

@ls-michael-smith ls-michael-smith left a comment

Choose a reason for hiding this comment

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

Only thing I wonder is if we're going to get hit with some 'next year' vs 'next' issue.

@vbergeron-ls
Copy link
Author

Only thing I wonder is if we're going to get hit with some 'next year' vs 'next' issue.

@ls-michael-smith I don't want to expose 6 different configs (2 for each of month/year/years views), so I'm thinking of only using Previous/Next (so changing localization in the chronogolf repo).

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.

2 participants