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

Add aria-selected attribute to record tabs for accessibility. #2501

Merged
merged 4 commits into from Sep 14, 2022
Merged

Add aria-selected attribute to record tabs for accessibility. #2501

merged 4 commits into from Sep 14, 2022

Conversation

ghost
Copy link

@ghost ghost commented Aug 3, 2022

No description provided.

@demiankatz
Copy link
Member

@aidaluuppala, I haven't studied this in great depth, so it's entirely possible that you've already thought about this and your approach is the most efficient way... but just to brainstorm a possible alternative: there is already a lot of logic in the code to add and remove the "active" class from tabs. Might it be more streamlined if you abstracted this into "activateTab / deactivateTab" functions and then incorporated the aria-selected logic into those functions? If I'm understanding correctly, the process of activating and deactivating tabs is directly linked to the need for aria-selected, so I'm wondering if it would be more clear to treat those as two steps of the same function rather than handling the two operations independently of one another.

What do you think? (And my apologies if I'm thinking about this incorrectly!) :-)

@ghost
Copy link
Author

ghost commented Aug 3, 2022

@demiankatz thank you and good point, I'll try and incorporate this with the active class logic.

@ghost
Copy link
Author

ghost commented Aug 5, 2022

@demiankatz It seems that the logic of active class is in the bootstrap library, but now there is an event listener that is listening to tab shown event, so it should be a bit more streamlined.

@demiankatz
Copy link
Member

Thanks, @aidaluuppala, this is much simpler and easier to understand! :-) I'm asking @crhallberg to give it a review as well since he's more familiar with our UI code and might have some suggestions that I overlooked. Once he approves, I think it's ready to merge. Since I'll be away for the next two weeks, he's welcome to hit the merge button in my absence if he's happy with everything.

@crhallberg
Copy link
Contributor

Thank you for your patience!

themes/bootstrap3/js/record.js Show resolved Hide resolved
@demiankatz
Copy link
Member

Thanks, @aidaluuppala!

@demiankatz demiankatz merged commit 159d3fa into vufind-org:dev Sep 14, 2022
EreMaijala added a commit to EreMaijala/vufind that referenced this pull request Jan 24, 2023
)

Now caches parsed results to avoid repeatedly processing the feed data. Also stores an array of allowed images so that it's easier to check when loading an image.
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