Skip to content
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

[question] In DataGrid for accessibility, I am unable to move out from the cell where there is Link (React-Router) using arrow keys #14815

Open
sagar1111212121 opened this issue Oct 3, 2024 · 4 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@sagar1111212121
Copy link

sagar1111212121 commented Oct 3, 2024

The problem in depth

We are trying to make our site AA accessibility compliant. What we have observed in the DataGrid is, arrow keys are working all well until we have custom columns using cellRender where we have used react-router's Link.

We are able to focus it using arrow key but once focus is set in that cell, it is not coming out using arrow keys.

We have checked on the MUI Accessibility section 'https://v6.mui.com/x/react-data-grid/accessibility/#system-GridAriaV7.tsx'. there also we see similar issue where, once focus is on email column, user is unable to move out to next column using arrow key.

Image

 const fiDataGridColData: GridColDef[] = [
    {
      field: NAME_FIELD,
      headerName: NAME,
      disableColumnMenu: true,
      flex: 2,
      renderCell: (params: any) => {
        const fiNameWithoutSpace = `${params?.row?.name.replaceAll(/\s/g, '')}FI_Link`;
        return (
          <Tooltip description={params.row.name} placement='top'>
            <Link
              tabIndex={params.tabIndex}
              to={`/financialinstitution/${params.row.fiId}`}>
              {params.row.name}
            </Link>
          </Tooltip>
        );
      },
    },
    {
      field: CLIENT_ID_FIELD,
      headerName: CLIENT_ID,
      disableColumnMenu: true,
      flex: 1,
    },
  ];

   <DataGridPro
        rows={fiDataGridRowData}
        columns={fiDataGridColData}
        ....
   />

Your environment

`npx @mui/envinfo`
  Chrome Browser
  Output from `npx @mui/envinfo` goes here.

Search keywords: Datagrid accessibility
Order ID: 81479

@sagar1111212121 sagar1111212121 added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Oct 3, 2024
@github-actions github-actions bot added component: data grid This is the name of the generic UI component, not the React module! support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/ labels Oct 3, 2024
@romgrk
Copy link
Contributor

romgrk commented Oct 3, 2024

Could you please share your reproduction case in a runnable sandbox? You can fork any of the docs demo using these buttons: https://mui.com/x/introduction/support/#bug-reproductions

@romgrk romgrk added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 3, 2024
@sagar1111212121
Copy link
Author

sagar1111212121 commented Oct 3, 2024

https://codesandbox.io/p/sandbox/4kndfg?file=%2Fsrc%2FDemo.tsx%3A23%2C18

This is MUI Datagrid demo only. So what we have observed is, Arrow keys on link and custom column having button or icon button works just fine in normal case but if we have screen reader like 'NVDA' running, arrow key stuck at such link/custom column having buttons and it does not shift left or right on arrow key press.

You can try same on above by running NVDA and without NVDA.

With NVDA running, once such link column is in focus and when we press arrow key, instead of jumping focus to next cell, it reads each character withing that link.

Is there any solution for this?

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 3, 2024
@romgrk
Copy link
Contributor

romgrk commented Oct 3, 2024

Could you put your code inside that codesandbox? Or is the problem reproducible with the demo as it is?

@romgrk romgrk added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 3, 2024
@sagar1111212121
Copy link
Author

Yes, you can reproduce issue with this demo itself. Keep NVDA screen reader running and then try to use keyboard on the email column. It doesnt move out of email column

https://codesandbox.io/p/sandbox/4kndfg?file=%2Fsrc%2FDemo.tsx%3A23%2C18

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

2 participants