Repository navigation
fix: make file requests dialog accessible - #64471
Conversation
|
|
||
| <div v-if="password !== null" class="file-request-dialog__password-field"> | ||
| <NcPasswordField | ||
| id="file-request-dialog-password" |
9e1b8f7 to
7d45d25
Compare
7d45d25 to
36d410a
Compare
|
|
||
| methods: { | ||
| returnFocusTarget(): HTMLElement | null { | ||
| return document.querySelector<HTMLElement>('[data-cy-upload-picker] button') |
There was a problem hiding this comment.
Ideally not use the data selected, but there is also no public "api" here. Maybe
| return document.querySelector<HTMLElement>('[data-cy-upload-picker] button') | |
| return document.querySelector<HTMLElement>('.upload-picker button') |
36d410a to
59ac106
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
| {{ t('files_sharing', 'Where should these files go?') }} | ||
| <label class="file-request-dialog__legend-label" for="file-request-dialog-destination"> | ||
| {{ t('files_sharing', 'Where should these files go?') }} | ||
| </label> |
There was a problem hiding this comment.
That should not be the case, now NcTextField has two labels.
The legend doesn't need a label
There was a problem hiding this comment.
It works, but the announcement is redundant. Two ways to clean it up:
Option A: legend names the group, NcTextField names the field (the easiest I'd say)
Remove the <label> from the legend and keep NcTextField's label prop.
<fieldset class="file-request-dialog__destination" data-cy-file-request-dialog-fieldset="destination">
<legend>{{ t('files_sharing', 'Where should these files go?') }}</legend>
<NcTextField
id="file-request-dialog-destination"
:label="t('files_sharing', 'Upload destination')"
…>
<IconFolder :size="18" />
</NcTextField>
…
</fieldset>- Group: "Where should these files go?"
- Field: "Upload destination"
- This is the intended
fieldset/legendsemantics. Clicking the legend no longer focuses the input, but the field's own label still does.
Option B: legend label is the only label
Keep <label for> in the legend and stop NcTextField from rendering its own with label-outside.
<fieldset class="file-request-dialog__destination" data-cy-file-request-dialog-fieldset="destination">
<legend>
<label class="file-request-dialog__legend-label" for="file-request-dialog-destination">
{{ t('files_sharing', 'Where should these files go?') }}
</label>
</legend>
<NcTextField
id="file-request-dialog-destination"
label-outside
…>
<IconFolder :size="18" />
</NcTextField>
…
</fieldset>- Group and field are both named "Where should these files go?"
- There is still a double announcement (group + field), but it's acceptable and explicit.
- Clicking the legend focuses the input.
Either way: link the info text to the field
The lock notice is not announced when the input has focus. Use helper-text, which NcTextField wires up with aria-describedby:
<NcTextField
…
:helper-text="t('files_sharing', 'The uploaded files are visible only to you unless you choose to share them.')">To keep the custom <p> with the lock icon, give it an id and pass aria-describedby="file-request-dialog-destination-info" to NcTextField instead. Check that NcTextField doesn't override its own aria-describedby when you do this.
59ac106 to
0857bf6
Compare
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
…equest UI Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
… dialog Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
0857bf6 to
04c6d12
Compare
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Summary
Improve a11y of the Create file request dialog:
<ul>/<li>with an accessible name (Recipient emails).Remove email: {email}instead of a sharedRemove email.<label for>, fields have stable ids, helper text isaria-describedby, and the expiration date keeps a visible linked label.Checklist
3. to review, feature component)stable32)AI (if applicable)