davidtheclark / focus-group Goto Github PK
View Code? Open in Web Editor NEWCreate a group of nodes with special focusing powers
Home Page: http://davidtheclark.github.io/focus-group/demo/
License: MIT License
Create a group of nodes with special focusing powers
Home Page: http://davidtheclark.github.io/focus-group/demo/
License: MIT License
It really should, and the docs say it should. So there.
How do you feel about an onFocus
callback? So if you have an element that can't receive focus you can add a class yourself or handle the state in something like React and apply a style. I'm trying to build a combobox right now and need to have a fake focus group so the input can remain focused, but still allow choosing a result. Thoughts? I can put together a PR if you like the idea. Maybe something like this?
onFocus: options.onFocus || function (member) {
focusNode(member.node)
}
Then it would be the user's responsibility to handle focusing the element however they wanted.
edit
Realized this can't be solved with just a callback. I'm guessing another option like groupNode
would be required to determine what the focus group is. Any ideas on that?
Do you think the document listener should be delegated? Then there is only one listener rather than a listener for every Focus Group. I can PR if you would like.
How do you feel about allowing more ARIA keyboard controls for these options? Things like pageUp
and pageDown
? More can be seen here in the keyboard control section: https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#accordion
I'm glad to do a PR for this as well if you would like :) maybe rename them to something like nextControls
and prevControls
?
I've been shifting my focus away from UI development, so don't plan on addressing new issues myself. If you use this library and want to see development continue, you can make that happen by becoming a co-maintainer โ with permissions to triage issues, merge PRs, cut releases, etc.
Please comment below if you're interested!
Another possibility is for a dedicated owner to fork this code and create a new package. I'd be happy to link to that library from the README of this one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.