Comments (4)
Wow, that's a completely valid observation! A real issue that needs to be addressed.
from v-onboarding.
I was able to get around this.
Issue 1 workaround:
add this to every step
on: {
beforeStep: () => onBeforeStep(),
afterStep: () => onAfterStep(),
},
onBeforeStep
and onAfterStep
are defined as such:
const onBeforeStep = () => {
document.addEventListener('keydown', keydownHandler);
};
const onAfterStep = () => {
document.removeEventListener('keydown', keydownHandler);
};
keydownHandler
is defined as such:
const keydownHandler = (event: KeyboardEvent) => {
if (event.key === 'Tab') {
/* If you hit tab, the close button will be focused instead of the primary. This is bc the keydown event is
* processed first (primary btn is focused), then the browser normally handles the tab press, thus ending on
* the close button. */
const primaryBtn = document.querySelector('button.v-onboarding-btn-primary');
// @ts-ignore this is ok, focus on primary button if it exists
primaryBtn?.focus();
document.removeEventListener('keydown', keydownHandler);
}
};
Issue 2 workaround:
wrap VOnboardingWrapper in a the FocusLoop component from vue-a11y
<FocusLoop>
<VOnboardingWrapper ref="wrapper" :steps="steps" :options="options" />
</FocusLoop>
and a visual accessibility fix, to see which button has focus:
.v-onboarding-item {
button:focus {
outline-color: black;
}
}
If this changes look good, and you think they'd be compatible with the code base, I'm happy to make a fork and work on integrating these changes.
from v-onboarding.
Hi all! Thank you for you interest and potential suggestions for this issue, I appreciate it. I've implemented a focus-trap feature and it should be live soon
from v-onboarding.
🎉 This issue has been resolved in version 2.8.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from v-onboarding.
Related Issues (20)
- Add delay and hide / autoHide HOT 3
- Add indicator for previous click HOT 2
- Dialog placement HOT 1
- V-HTML HOT 3
- toRefs expects a reactive object but received a plain one HOT 1
- Inaccessible panel — Off the bottom of the screen HOT 4
- Vue app is crashing. Uncaught TypeError: Object(...) is not a function HOT 4
- Attributes as selector HOT 1
- Rectangular highlight area is offset from the target element HOT 2
- Could not find a declaration file for module 'v-onboarding' HOT 5
- vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode) is not a function HOT 2
- Could not find a declaration file for module 'v-onboarding' HOT 9
- Overlay doesnt cover screen when css attribute zoom < 1 is applied on parent
- Cannot focus to the attached element input after version 2.7.0
- Enabling OverlayInteraction does not prevent click events from being blocked
- Focus on element not working correctly after navigation/redirection
- Ability to track moving target element? HOT 1
- Ability to control where the overlay pops up HOT 2
- `preventOverlayInteraction` doesn't remove all blocking listeners 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 v-onboarding.