swup / a11y-plugin Goto Github PK
View Code? Open in Web Editor NEWA swup plugin for enhanced accessibility 🔉
Home Page: https://swup.js.org/plugins/a11y-plugin
License: MIT License
A swup plugin for enhanced accessibility 🔉
Home Page: https://swup.js.org/plugins/a11y-plugin
License: MIT License
Description of the issue
I just installed a11y-plugin in a fresh typescript project and got this error:
Could not find a declaration file for module '@swup/a11y-plugin'.
How to reproduce the issue
...seems like it's due to the missing toplevel "types"
property. I thought it wasn't necessary anymore due to us providing it in the "exports"
field anyways, but adding it made the error go away in VSCode.
Describe the problem
Intuitively, I would have thought that this CSS should hide any outline on the <main>
element:
main:focus {
outline: none;
}
But in the docs it recommends this approach:
main[tabindex="-1"] {
outline: none;
}
In my tests, it works well with the simple :focus
selector. Is there a reason for the [tabindex]
form being chosen in the docs?
"SwupA11YPlugin" is writen with a capital Y in the code, but the example has a small y
const swup = new Swup({
plugins: [new SwupA11yPlugin()]
});
should be:
const swup = new Swup({
plugins: [new SwupA11YPlugin()]
});
or the code changed to have "SwupA11yPlugin"
Describe the problem
main
element, e.g. fragment visits like filter UIsvisit.focus = '#list'
or similarDescribe the proposed solution
visit.focus
— or maybe nested/grouped somewhere?content:focus
that can be replacedHow important is this feature to you?
Describe the problem
When using in-site app views that alter the URL but are being ignored by swup due to the use of resolveUrl
, a11y plugin doesn't announce anything, since there is no swup visit happening.
Describe the proposed solution
It would be handy to be able to manually trigger announcements:
import SwupA11yPlugin from "@swup/a11y-plugin";
const swup = new Swup({
plugins: [
new SwupA11yPlugin(),
],
});
// sometime later:
createHistoryRecord(newUrl);
swup.say?.(`Navigated to filter ${currentFilterName}`);
How important is this feature to you?
Description of the issue
How to reproduce the issue
respectReducedMotion
Evaluate whether we should disable transitions for devices that request reduced motion:
Details
Revisiting the reduced motion media query
Example code
@media screen and
(prefers-reduced-motion: reduce),
(update: slow) {
.transition-fade {
transition-duration: 0.001ms !important;
}
}
Describe the problem
lang
will not change the language of announcementsDescribe the proposed solutions
Tending towards option 1, or a combination of 1 and 2.
{ en: 'Navigated to', de: 'Seite geladen' }
content:announce
to modify these on the fly<meta name="swup-a11y-announce" content="Seite geladen">
Alternatives considered
How important is this feature to you?
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.