-
Notifications
You must be signed in to change notification settings - Fork 39
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 accessibility issues on image carousel #2140
Conversation
and disable pause-on-focus behaviour until we can work out how to differentiate keyboard and mouse focus
} | ||
|
||
function onPause (pause: boolean, updateState: boolean): void { | ||
if (pause) { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
$('#rotationControlIcon').addClass('bi-play') | ||
$('#rotationControlIcon').removeClass('bi-pause') | ||
} | ||
} else { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
Code Climate has analyzed commit 0a9029d and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 87.1% (0.0% change). View more on Code Climate. |
Resolves #2106
This was a biggie. Making a fully a11y compliant carousel is trifficult! The only thing missing is that it should auto-pause when it gets keyboard focus, but I can't work out how to do that because focus events look identical from mouse or keyboard, and triggering it too much causes problems. So, better to leave that feature out and call it close enough.