Open joshkimux opened 3 years ago
I haven't worked on this yet, but when you get a chance, can you try this with a password protected PDF? You can download example files from this comment - https://github.com/department-of-veterans-affairs/va.gov-team/issues/14011#issuecomment-703991496 - it adds a password input with "Add password" button.
I'm experiencing some bugs where focus will always reroute to the add password field 😕
Also, the error for an incorrect password isn't being announced 😦
Fix merged into master, it should be available in staging soon. Please verify at your leisure 😺
@Mottie Thanks for this! I just started and testing and realized this is more verbose than I anticipated due to the nested fieldsets (something I should have absolutely considered from the beginning).
I'm going to see if I can iterate on this a bit with @AngelaFowler82 on codepen to see if there would be ways to find a better balance. I'd love to get your help there too from a technical perspective.
@Mottie just letting you know I haven't forgotten this and have whipped up a codepen to test it. I came across a snag where the list loop for military service history can conflict with uploaded documents.
Specifically, how do we provide unique labels without the verbosity that can scale across all instances of list loop implementation?
For example:
Questions I'm working through:
What I've tried/considering:
aria-label
with aria-describedby
to add extra details to distinguish labels apart. For example, the aria-label
could contain a short label e.g. "Update army" while the aria-describedby
could provide additional differentiators e.g. "Service period from 2010 to 2016." Problem: I don't think this scales to other instances of the list loop and would be a one off for service history.@caw310 👋 Quick question for you-- is the list loop pattern currently being worked on in the design or forms system? If so, would there be anyway for us to link this ticket up as a case to solve for?
@joshkimux , There is a list loop pattern that is deployed. Here is a link to that pattern. https://design.va.gov/patterns/forms/list-and-loop
Adding Katy in case she has more insights on this.
@caw310 Thank you! I think this is a bit more of a complex case as it involves a file upload instead of an input field... is that too much of an edge case for the design system team to consider in the future? @k80bowman
We don't have any plans to revisit the list-loop pattern currently, but we could potentially look into this in the future. I'm not sure how much of an edge case it is without an audit to see how often this type of pattern is being implemented.
This might be used with 10-10ez as well? @Dene-human could you help confirm that? Otherwise, if it's benefits specific we can see what we can do about it within our team.
Hey! We might have a couple of overlaps.
On the insurance detail we have an array of items- and we are also waiting on a bug fix (ticket). Another note, our goal is to split this page, but we can't currently have an array of items on its own page because of how the Review page handles it.
In the Military History section we upload a doc, but just a single file (not list loop)
@RakshindaAslam I see you've added the disability-experience
label to this! Just as a heads up for context, I strongly recommend working with the design system team, as this issue has cropped up on multiple teams.
Thanks @joshkimux! cc @lydiahooper
Updated assignees, added design system label, and added note to ticket on the subtask pattern
Is this still relevant, or has it been resolved at the design system level?
I think it's still relevant:
The select is set using uiSchema:
aria-describedby
.
va-select
. This web component doesn't have the ability to add a dynamically set (with file name) aria-describedby
The delete button has been updated, and does include the file name within the aria-label
, so this one should no longer be an issue.
Here's an example of our team's Supplemental Claim form:
<li id="root_additionalDocuments_file_0" class="va-growable-background">
<p>You’re adding this evidence:</p>
<strong
id="root_additionalDocuments_file_name_0"
class="dd-privacy-hidden"
data-dd-action-name="file name"
>
Test.pdf
</strong>
<div class="schemaform-file-attachment review">
<va-select
class="rjsf-web-component-field hydrated"
label="Document type"
name="root_additionalDocuments_0_attachmentId"
required="true"
uswds
value="L015"
<!-- we could add `message-aria-describedby` here, but it'd be a fixed message -->
>
<option value="L015">Buddy/Lay Statement</option>
<!-- ... -->
</va-select>
</div>
<div class="vads-u-margin-top--2">
<va-button
secondary
class="delete-upload vads-u-width--auto hydrated"
label="Delete Test.pdf" <!-- defines aria-label -->
text="Delete file"
uswds
/>
</div>
</li>
Hmm, actually... I think I can update the FileField
to pass in the file name and then we include a message-aria-describedby
and that should fix it!
I've got a PR open to fix this. Once merged, and the component library has been updated, you can use both of these options:
attachmentSchema: ({ fileId, index, fileName }) => ({
'ui:title': 'Document type',
'ui:options': {
// messageAriaDescribedby utilized by web components
// This already works for `va-text-input`, but library update needed
// to support `va-select`
messageAriaDescribedby: `Select a document type for ${fileName}`,
// widget props for default form library widgets (non-web components)
widgetProps: {
'aria-describedby': fileId,
'data-index': index,
},
},
}),
Use the above pattern to fix the select and/or document name input. Then we can close this ticket as complete.
Following up here. The component library has been updated and I checked our Supplemental Claim form upload page. The document type select now includes a descriptive label. Our Notice of Disagreement form does not ask for a document type.
@saderagsdale We can remove our team from this ticket. I just checked 526, and the upload page is not yet using a va-select
web component, but it does include an aria-describedby
508-defect-2
⚠️ RECOMMENDATION MAY BE OUTDATED WITH INTRODUCTION OF NEW SUBTASK PATTERN ⚠️
Feedback framework
Definition of done
Point of Contact
VFS Point of Contact: Josh
User Story or Problem Statement
As a screen reader user, I want to know which document I am editing or deleting on the supporting evidence page without having to manually find the document title.
Details
If a screen reader user were to tab through the supporting evidence list loop pattern after uploading multiple documents, they would hear something like this on each tab stop:
This is particularly troubling for users with cognitive disabilities as well.
Acceptance Criteria
Environment
Steps to Recreate
Possible Solutions
As these are all collectively already nested within a
fieldset
, it would be difficult to approach this from a purehtml
standpoint by nesting each individual document within its own nestedfieldset
.Aria-describedby
We could take advantage of the existing
strong
elements that include the document's title and use it as a way to describe their respective labels and buttons by usingaria-describedby
.For example (simplified with only relevant items)
Before
After
Aria-labelledby
We could also use aria-labelledby, which may be more appropriate as it will replace the accessible name. This could add together the file name and the label. For example:
Before
After
Would love to get your eye on this recommendation @1Copenut as this one is a bit tricky. Has this emerged elsewhere before, and if so, how have we handled it?
Screenshots or Trace Logs
This also exists on the review answers page where the user can tab through 3 buttons which all say "delete file button"