Skip to content

[Backdrop] Adds audio feedback for backdrop state change for assistive tech - #37202

Closed
michellexliu wants to merge 2 commits into
mui:masterfrom
michellexliu:backdrop-state-voiceover
Closed

[Backdrop] Adds audio feedback for backdrop state change for assistive tech#37202
michellexliu wants to merge 2 commits into
mui:masterfrom
michellexliu:backdrop-state-voiceover

Conversation

@michellexliu

Copy link
Copy Markdown

Resolves #31371

  • Adds screen reader announcement that a backdrop has been opened using aria-live attributes
  • Fixes Level A WCAG failure of 4.1.2: Name, Role, Value.
backdrop-demo.mov

@mui-bot

mui-bot commented May 7, 2023

Copy link
Copy Markdown

Netlify deploy preview

https://deploy-preview-37202--material-ui.netlify.app/

@material-ui/core: parsed: +0.09% , gzip: +0.12%

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against 19f9e9b

@zannager zannager added the scope: backdrop This is the name of the generic UI component, not the React module! label May 8, 2023
@zannager
zannager requested a review from siriwatknp May 8, 2023 07:45
ownerState={{ ...ownerState, ...rootSlotProps?.ownerState }}
classes={classes}
ref={ref}
ref={ref || backdropRef}

@mj12albert mj12albert May 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michellexliu Thanks for working on this!

There is a useForkRef utility for handling the ref in these cases:

import useForkRef from '../utils/useForkRef';

const Backdrop = React.forwardRef(function Backdrop(inProps, ref) {
  const backdropRef = React.useRef(null);

  const handleRef = useForkRef(backdropRef, ref);

  return (
   <TransitionComponent {/* etc */}>
     <BackdropRoot ref={handleRef}>
       {/* ... */}
     </BackdropRoot>
   </TransitionComponent>
  )
})

(An example https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Chip/Chip.js#L347-L348)

@ZeeshanTamboli ZeeshanTamboli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked on NVDA version 2023.1 and I am not getting any announcements in https://deploy-preview-37202--material-ui.netlify.app/material-ui/react-backdrop/#example. Or am I missing something here?

@ZeeshanTamboli

Copy link
Copy Markdown
Member

Since there is no reply and updates from the author, I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: backdrop This is the name of the generic UI component, not the React module!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs][backdrop] Gives only visual feedback of state change, no communication to assistive tech

5 participants