-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add progressively enhanced File Upload component #5305
base: main
Are you sure you want to change the base?
Conversation
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 85e94b6 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
9113f76
to
26b05e1
Compare
26b05e1
to
8fe1f08
Compare
I've started testing this today. But I've only tested with Dragon so far. Unfortunately it doesn't work. Roughly 9 out of 10 times saying "click choose file" or "click button" only focused on the button but didn't open the file dialog. And weirdly 1 out of 10 times it did. But I didn't do anything differently between when it did and when it didn't. When we've figured out why this is happening I will test again, including in other assistive technologies. |
8fe1f08
to
d411a91
Compare
Rebased this whilst I do some local testing |
Just in case it's helpful - we had a styled upload button on the passport service - which has presumably been tested by DAC multiple times. |
@edwardhorsford Do you know if it was tested in Dragon NaturallySpeaking and, if so, whether it exhibited the same issues described by @selfthinker? |
I assume it was tested with it as DAC did the testing. But I don't recall more than that. You could try on the live service to see how it works now... |
cee7848
to
9cfd3be
Compare
Adding
|
DAC's solution was using the |
6ab7ef8
to
f2bccb3
Compare
Looks like it was dropped at some point, possibly during a rebase
Update name and description of macro options in docs and code
…ncement Update announcement when dropping a file to be the status
The name is more representative
Simplify selectors in `index.scss` of File Upload by adding new `govuk-file-upload--enhanced` class. Add `govuk-file-upload--enhanced` to `input` element in Javascript initialisation.
The element is its own block not a descendant of `.govuk-file-upload`. Renames its descendants to make them elements of `.govuk-file-upload-button` rather than of `.govuk-file-upload`.
Helps understand the changes that happen on hover
Use SCSS nesting to simplify selectors.
Improve naming of File Upload classes and regroup state styles
- `input` element hidden during File Upload enhancement initialisation - `button` listens for drop event and updates status and input accordingly
- Remove `--enhanced` and `-dragging` classes for `govuk-file-upload` - Remove JS in File Upload that adds the removed classes on initialisation and drag - Update input selector in File Upload test
Fix functionality of enhanced File Upload when no CSS
As part of post-audit investigations, a spike into layering a new UI onto the File upload component that should be a bit more friendly to assistive technologies. alphagov/govuk-design-system#4031
Note: This hasn't actually been tested across browsers and ATs yet,
Changes
multiple
,accepts
andcapture
attributes; etc.)Thoughts