department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

[a11y support] MHV - Medical Records Print/Download Button #57873

Open sara-amanda opened 1 year ago

sara-amanda commented 1 year ago

This ticket contains the following sections:

  1. Midpoint Review: Print/Download Button
  2. Example Code c/o Bobby
  3. Experimental Warning: WAI APG :warning:
  4. aria-haspopup feedback
  5. Pros, Cons and Unknowns
  6. a11y Feedback
  7. a11y Recommendations (a. if you use experimental and b. if you use existing pattern)

Midpoint Review: Print/Download Button

Ticket #57260

Example Code c/o Bobby

Button closed
<button type="button" id="menubutton1" aria-haspopup="true" aria-controls="menu1">
             Actions
           </button>

Button opened
<div class="menu-button-actions">
           <button type="button" id="menubutton1" aria-haspopup="true" aria-controls="menu1" aria-expanded="true">
             Actions
           </button>
           <ul id="menu1" role="menu" tabindex="-1" aria-labelledby="menubutton1" aria-activedescendant="mi1" style="display: block;">
             <li id="mi1" role="menuitem" tabindex="-1" class="focus">Action 1</li>
             <li id="mi2" role="menuitem" tabindex="-1" class="">Action 2</li>
             <li id="mi3" role="menuitem" tabindex="-1" class="">Action 3</li>
             <li id="mi4" role="menuitem" tabindex="-1" class="">Action 4</li>
           </ul>
         </div>
When the button is interacted with (opened), the focus moves to the first item on the list (<li id="mi1" role="menuitem" tabindex="-1" class="focus">Action 1</li>)

Note: Navigate to “Example” and there is a CodePen Example that Bobby is referencing.

Experimental Warning: WAI APG :warning:

Comes with warning not to use in production on the W3C Site (see: Read this First and large yellow box at the top of the page)

The WAI APG site reflects ideal implementations of ARIA, not real-world implementations by browser and AT vendors.

Read This First

The code in this example is not intended for production environments. Before using it for any purpose, read this to understand why.

This is an illustrative example of one way of using ARIA that conforms with the ARIA specification.

There may be support gaps in some browser and assistive technology combinations, especially for mobile/touch devices. Testing code based on this example with assistive technologies is essential before considering use in production systems.

The ARIA and Assistive Technologies Project is developing measurements of assistive technology support for APG examples.

Robust accessibility can be further optimized by choosing implementation patterns that maximize use of semantic HTML and heeding the warning that No ARIA is better than Bad ARIA.

Recommendations

aria-haspopup feedback

<div class="menu-button-actions">
           <button type="button" id="menubutton1" aria-haspopup="true" aria-controls="menu1" aria-expanded="true">

Pros, Cons and Unknowns

Pros

Cons

Unknowns

a11y Feedback

There could be a lot of ways we can approach this; however, regardless of the approach, if we are working with an experimental component, the Design System Team will need to be involved to provide guidance, prior to publishing.

a11y Recommendations

Option A: Your Experimental Design

sara-amanda commented 1 year ago

CAIA Update

@BobbyBaileyRB @coultonbunney-usds @alexiawunder This ticket is in response to Bobby's Slack thread about print/download buttons.

Let me know if you have any questions. Happy to help!

coultonbunney-usds commented 1 year ago

One thing I've been curious about this entire time is that the primary navigation menu for va.gov is essentially what we want to create here. It uses aria-haspopup=true and has been in wide use for some time. Can we learn from that here, so that we may not need to treat this as so experimental?

sara-amanda commented 1 year ago

Excellent question, @coultonbunney-usds !

I had to inquire about this one because the header was before my time, but I was able to gather the following information that should help to answer your question:

I hope that helps! :slightly_smiling_face:

@artsymartha68 @laflannery @briandeconinck

sara-amanda commented 1 year ago

Resource Item

This post is a great resource regarding menus and menu buttons: Menus and Menu Buttons from Inclusive Components. @coultonbunney-usds

AngelaFowler82 commented 1 year ago

This is just to note that I met with the team on Friday and clarified our recommendation concerning the download components. Since these components link to an external file, even though they don't actually take the user to another location we recommend that they still be styled and coded as links. I reitterated that the style and coding be consistent.

sara-amanda commented 1 year ago

Print/Download Update

Next Steps

Discussion

Slack Discussion 🧵 7/10/2023

Note: Aria-controls is not widely supported but won't hurt anything. It appears to be just in JAWS and is ignored in other SR such as VO and NVDA.

sara-amanda commented 1 year ago

Print/Download Update

New DST Component Proposed

Additional Considerations

sara-amanda commented 1 year ago

Print/Download Update

"Print and download button menu, we [Medical Records] aren’t ready to implement the text file, so we [MR] are taking that out of the button menu for now. It will be put back in by the time they get to P1."

^Per Lexi in VA.gov Weekly Design Review Meeting 8/30/2023 4-5 p.m. EST

sara-amanda commented 1 month ago

@rileyorr this is an old MHV ticket from our backlog

rileyorr commented 3 weeks ago

Hi @alexiawunder and @BobbyBaileyRB! I inherited some older MHV-related CAIA tickets and was wondering if either of you could help me determine if this one should remain open and if it has any status updates.

This ticket appears to be related to a print/download component that was added to the design system and appears to be blocked but I'm not sure why. Lmk if you have any questions or if another person would better know the status of this work. Thanks!

alexiawunder commented 3 weeks ago

@rileyorr Here is some information about what we've done so far for getting the print/download menu button added to the design system as of January of this year: