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

Fix accessibility issues on image carousel #2140

Merged
merged 15 commits into from
May 2, 2024
Merged

Fix accessibility issues on image carousel #2140

merged 15 commits into from
May 2, 2024

Conversation

Floppy
Copy link
Collaborator

@Floppy Floppy commented May 2, 2024

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.

@Floppy Floppy added bug Something isn't working accessibility Accessibility issues & tasks labels May 2, 2024
@Floppy Floppy enabled auto-merge May 2, 2024 21:36
}

function onPause (pause: boolean, updateState: boolean): void {
if (pause) {
Copy link

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 {
Copy link

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.

Copy link

codeclimate bot commented May 2, 2024

Code Climate has analyzed commit 0a9029d and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

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.

@Floppy Floppy merged commit 992508e into main May 2, 2024
10 checks passed
@Floppy Floppy deleted the carousel-a11y branch May 2, 2024 21:39
@Floppy Floppy changed the title Carousel a11y Fix accessibility issues on image carousel May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Accessibility issues & tasks bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Image carousel should have controls to pause autorotation
1 participant