Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tailwind z-index utilites don't work well with SkipLinks z-index #73

Closed
david-abell opened this issue Dec 19, 2023 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@david-abell
Copy link
Contributor

The SkipLinks z-index: 10; does not work well with Tailwind z-index utilities. Tailwind increments at z-0, z-10, z-20, z-30, z-40, z-50 so using those utility helpers will cause elements to overlap the SkipLinks.

It seems to be more of a design consideration fix than anything. I had initially thought 49 might be a good value but I'm leaning towards setting a large value in such as 9999 on the component so that none of the tailwind utilities would break functionality.

Are their considerations I've missed or should 9999 be sufficient? I can't think of a use case where the the skipLink should not be on the top layer but tailwind arbitrary value syntax z-[some_large_number] can always be used if it is really needed...

@markteekman
Copy link
Member

Great catch @david-abell, never thought of it 🤔 You're absolutely right, the skip links should always be on top of the UI, the only exception I can think of is a modal but then again, your focus is trapped when a modal is open, so that should not be a problem. Setting z-index: 9999 would be sufficient 🙂 I'm upgrading the Accessible Starter to Astro 4.0, I'll take this one with me when updating the new release!

Thanks David!

@markteekman markteekman self-assigned this Dec 26, 2023
@markteekman markteekman added the enhancement New feature or request label Dec 26, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants