A11y fixes for Account UI (#22665)
* fixed empty <th> violation * fixed empty <th> violation * fixed empty <th> violation * fixed unique attribute id violation in groups * fixed a11y violation for account security * fixed isShared in <th> element * fixed aria-labelledby * changed aria-labelledby to aria-label --------- Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
parent
bf0d16c4ff
commit
49959348ad
5 changed files with 16 additions and 6 deletions
|
@ -158,5 +158,7 @@
|
||||||
"updateSuccess": "Resource successfully updated.",
|
"updateSuccess": "Resource successfully updated.",
|
||||||
"user": "User",
|
"user": "User",
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
"usernamePlaceholder": "Username or email"
|
"usernamePlaceholder": "Username or email",
|
||||||
|
"groupsListHeader": "Groups list header",
|
||||||
|
"groupsListColumnsNames": "Groups list columns names"
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ const DeviceActivity = () => {
|
||||||
className="signed-in-device-list"
|
className="signed-in-device-list"
|
||||||
aria-label={t("signedInDevices")}
|
aria-label={t("signedInDevices")}
|
||||||
>
|
>
|
||||||
<DataListItem aria-labelledby="sessions">
|
<DataListItem aria-labelledby={`sessions-${key}`}>
|
||||||
{devices.map((device) =>
|
{devices.map((device) =>
|
||||||
device.sessions.map((session) => (
|
device.sessions.map((session) => (
|
||||||
<DataListItemRow key={device.id}>
|
<DataListItemRow key={device.id}>
|
||||||
|
|
|
@ -53,7 +53,10 @@ const Groups = () => {
|
||||||
return (
|
return (
|
||||||
<Page title={t("groups")} description={t("groupDescriptionLabel")}>
|
<Page title={t("groups")} description={t("groupDescriptionLabel")}>
|
||||||
<DataList id="groups-list" aria-label={t("groups")} isCompact>
|
<DataList id="groups-list" aria-label={t("groups")} isCompact>
|
||||||
<DataListItem id="groups-list-header" aria-labelledby="Columns names">
|
<DataListItem
|
||||||
|
id="groups-list-header"
|
||||||
|
aria-label={t("groupsListHeader")}
|
||||||
|
>
|
||||||
<DataListItemRow>
|
<DataListItemRow>
|
||||||
<DataListItemCells
|
<DataListItemCells
|
||||||
dataListCells={[
|
dataListCells={[
|
||||||
|
@ -69,7 +72,10 @@ const Groups = () => {
|
||||||
/>
|
/>
|
||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
<DataListItem id="groups-list-header" aria-labelledby="Columns names">
|
<DataListItem
|
||||||
|
id="groups-list-columns-names"
|
||||||
|
aria-label={t("groupsListColumnsNames")}
|
||||||
|
>
|
||||||
<DataListItemRow>
|
<DataListItemRow>
|
||||||
<DataListItemCells
|
<DataListItemCells
|
||||||
dataListCells={[
|
dataListCells={[
|
||||||
|
|
|
@ -85,7 +85,7 @@ export const PermissionRequest = ({
|
||||||
<Tr>
|
<Tr>
|
||||||
<Th>{t("requestor")}</Th>
|
<Th>{t("requestor")}</Th>
|
||||||
<Th>{t("permissionRequests")}</Th>
|
<Th>{t("permissionRequests")}</Th>
|
||||||
<Th></Th>
|
<Th aria-hidden="true"></Th>
|
||||||
</Tr>
|
</Tr>
|
||||||
</Thead>
|
</Thead>
|
||||||
<Tbody>
|
<Tbody>
|
||||||
|
|
|
@ -154,7 +154,9 @@ export const ResourcesTab = ({ isShared = false }: ResourcesTabProps) => {
|
||||||
<Th aria-hidden="true" />
|
<Th aria-hidden="true" />
|
||||||
<Th>{t("resourceName")}</Th>
|
<Th>{t("resourceName")}</Th>
|
||||||
<Th>{t("application")}</Th>
|
<Th>{t("application")}</Th>
|
||||||
<Th>{!isShared ? t("permissionRequests") : ""}</Th>
|
<Th aria-hidden={isShared}>
|
||||||
|
{!isShared ? t("permissionRequests") : ""}
|
||||||
|
</Th>
|
||||||
</Tr>
|
</Tr>
|
||||||
</Thead>
|
</Thead>
|
||||||
{resources.map((resource, index) => (
|
{resources.map((resource, index) => (
|
||||||
|
|
Loading…
Reference in a new issue