fix a11y bugs in RoutedTabs, UserList

This commit is contained in:
Keith J. Grant
2021-04-09 14:17:56 -07:00
parent be9622d03f
commit 94038006aa
3 changed files with 5 additions and 4 deletions

View File

@@ -60,6 +60,7 @@
"mode", "mode",
"aria-labelledby", "aria-labelledby",
"aria-hidden", "aria-hidden",
"aria-controls",
"sortKey", "sortKey",
"ouiaId", "ouiaId",
"credentialTypeNamespace", "credentialTypeNamespace",

View File

@@ -3,8 +3,7 @@ import { shape, string, number, arrayOf, node, oneOfType } from 'prop-types';
import { Tab, Tabs, TabTitleText } from '@patternfly/react-core'; import { Tab, Tabs, TabTitleText } from '@patternfly/react-core';
import { useHistory, useLocation } from 'react-router-dom'; import { useHistory, useLocation } from 'react-router-dom';
function RoutedTabs(props) { function RoutedTabs({ tabsArray }) {
const { tabsArray } = props;
const history = useHistory(); const history = useHistory();
const location = useLocation(); const location = useLocation();
@@ -36,8 +35,9 @@ function RoutedTabs(props) {
aria-label={typeof tab.name === 'string' ? tab.name : null} aria-label={typeof tab.name === 'string' ? tab.name : null}
eventKey={tab.id} eventKey={tab.id}
key={tab.id} key={tab.id}
link={tab.link} href={tab.link}
title={<TabTitleText>{tab.name}</TabTitleText>} title={<TabTitleText>{tab.name}</TabTitleText>}
aria-controls=""
/> />
))} ))}
</Tabs> </Tabs>

View File

@@ -43,7 +43,7 @@ function UserListItem({
}} }}
/> />
<Td id={labelId} dataLabel={i18n._(t`Username`)}> <Td id={labelId} dataLabel={i18n._(t`Username`)}>
<Link to={`${detailUrl}`} id={labelId}> <Link to={`${detailUrl}`}>
<b>{user.username}</b> <b>{user.username}</b>
</Link> </Link>
{ldapUser && ( {ldapUser && (