Comments (7)
Thanks for this. We'll look into it in some point. If you have ideas about resolving it, pull requests are welcome.
from air-light.
We've been looking into this in many versions during this one year period when improving accessibility. The nav works better now but if there are multi-level dropdowns under the last link there is just no practical way to figure out the real last visible link programmately based on one's actions.
In the latest Air there's an update that forces the last dropdown to expand by default so we have even mid-way "solution" to this. However it will not solve the issue that keyboard would keep the tabbing inside nav if user decides to collapse the last dropdown menu during tabbing prev and next inside the mobile menu.
I have not figured out a way to "record" the change in subdown toggle so that the last link variable would change with the toggling. This has been tricky to solve so pull requests are still more than welcome.
from air-light.
Quick thought here: why not change the focus trap to check if Node.contains
is false for the nav parent (meaning the next tab item is outside of the nav list), and then set the focus to the button? In my head, this should solve all the issues.
Just checked the latest release and the solution to open the last dropdown doesnt work well when the last dropdown isnt the last element, and it's no longer responsive (focus trap only works when the window is loaded under 960px, dropdown stays opened if window is resized larger.)
from air-light.
@michaelbourne A very good point! I'm bummed how we haven't thought outside the box and tried that approach here. We are currently in progress to rewrite parts of the navigation.js as it contains some duplicates and messy code (also when implemented latest eslint last time we noticed bunch of problems, hehe, been doing stuff with blindfold for too long I guess).
That bug about resizing in between of responsive breakpoint back and forth has been there since the first version as we don't have any resize events in place. I think it's not that important since people don't constantly resize the window.
Our first focus is to get navigation.js to go through linters during upcoming days. After this we start to solve other problems with the navigation.js. If you have already a suggestion how to implement the better focus trap, feel free to send a PR!
from air-light.
The resizing bug is just more noticeable now with the forced dropdown and window width check for the focus trap :)
Totally understood though. You've been committing like crazy this last month! When you get the new navigation.js file pushed, I'll go through it and see if I can get it working better for everyone. I have a few ideas that sound great in my head, but might not translate to code haha.
Appreciate the continued efforts!
from air-light.
The resizing bug is just more noticeable now with the forced dropdown and window width check for the focus trap :)
True.
Yeah, Air-light is our gem and affects in our everyday working lives so we try our best to make it as good as possible :) Glad you're helping, always feels good to get outside input.
from air-light.
This is so rare scenario and there has been no solutions or activity so I'm moving forward and closing this issue...
from air-light.
Related Issues (20)
- [Help wanted] Workflow for managing ACF fields within the theme HOT 4
- PHP Fatal error: Uncaught Error: Class 'Dotenv\Dotenv' not found HOT 1
- a11y: After searching we should skip focus back to search input by default HOT 1
- Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, string given HOT 2
- Make CPT & tax archive titles translatable HOT 1
- Control translatable post types and taxonomies from their class
- JS Error with Keyboard navigation HOT 4
- Remove opinionated colors from the default footer HOT 6
- Fix default theme preview HOT 1
- Cleanup script removes and touches site footer twice HOT 1
- Additional class names HOT 1
- Investigate `pll_translatable` not working properly on taxonomies HOT 1
- Any plans on implementing theme.json? HOT 3
- SVG Ready HOT 1
- Move to top is janky on Firefox HOT 4
- Remove root font-size 62.5%
- Anchors smoothing only works if all targets of links before the link exist
- Error: ENOENT: no such file or directory when running gulp HOT 3
- Custom tax from ACF not displaying HOT 2
- Deprecated: Using ${var} in WordPress 6.4.2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air-light.