-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Accessibility] Add button to skip past the discover doc table #12539
[Accessibility] Add button to skip past the discover doc table #12539
Conversation
Let's try to hide it, if it ends up being too complicated we'll leave it visible. |
@weltenwort Would you mind requesting @aphelionz for a review for you're ready? |
The "Skip to bottom"-button displays all remaining rows that were already loaded and focuses an anchor located below the table.
9e8e289
to
a19391f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a couple of comments down below.
$scope.scrollToBottom = function () { | ||
// delay scrolling to after the rows have been rendered | ||
$timeout(() => { | ||
$document.find('#discoverBottomMarker').focus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you're opting to use $document
instead of $element
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's just a remnant of the fact that the code lived deeper in the directive hierarchy previously. good catch
<div ng-if="rows.length == opts.sampleSize" class="discover-table-footer"> | ||
These are the first {{opts.sampleSize}} documents matching | ||
your search, refine your search to see others. | ||
<a ng-click="toTop()">Back to top.</a> | ||
<a tabindex="0" ng-click="scrollToTop()">Back to top.</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're in here anyway, would you mind adding kbnAccessibleClick
to this element? Currently if it has focus and you hit enter, nothing happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing that will also mean you can remove tabindex="0"
.
@lukasolson @cjcenizal Thanks for the reviews! I have addressed the two issue you mentioned. |
would you mind taking another look, @lukasolson @cjcenizal @aphelionz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
jenkins, test this |
Release Note: The new "Skip to bottom"-button in Discover is invisible unless focused. When activated it displays all remaining rows that were already loaded and focuses an anchor located below the table.
fixes #11855