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

[ML] Ensure Calendar creation navigation tabs are keyboard/screen reader accessible #23832

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h3 class="euiTitle">Create new event</h3>
<div class="main-container row1">
<div class="tabs-container">
<ul class="nav nav-pills nav-stacked">
<li ng-class="{ active: ui.rangeType === '0' }"><a ng-click="ui.setRangeType('0')"> Single day</a></li>
<li ng-class="{ active: ui.rangeType === '1' }"><a ng-click="ui.setRangeType('1')"> Day range</a></li>
<li ng-class="{ active: ui.rangeType === '2' }"><a ng-click="ui.setRangeType('2')"> Time range</a></li>
<li ng-class="{ active: ui.rangeType === '0' }"><a href="#" ng-click="ui.setRangeType('0', $event)"> Single day</a></li>
<li ng-class="{ active: ui.rangeType === '1' }"><a href="#" ng-click="ui.setRangeType('1', $event)"> Day range</a></li>
<li ng-class="{ active: ui.rangeType === '2' }"><a href="#" ng-click="ui.setRangeType('2', $event)"> Time range</a></li>
</ul>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ module.controller('MlNewEventModal', function (
start: moment().startOf('day'),
end: moment().startOf('day').add(1, 'days')
},
setRangeType(i) {
setRangeType(i, event = undefined) {
Copy link
Member

Choose a reason for hiding this comment

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

nit, i believe explicitly setting event to undefined here is redundant.
If nothing is passed in, it'll be undefined anyway? unless i'm missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not missing anything - just old habits. I'm good with removing it 👌

if (event && event.preventDefault) {
event.preventDefault();
}

$scope.ui.rangeType = i;
let width = MODAL_WIDTH_SMALL;
if (i === RANGE_TYPE.SINGLE_DAY) {
Expand Down