From 6c6ee372300c82817e2c428cf39e628312f2796e Mon Sep 17 00:00:00 2001 From: Austen Money Date: Mon, 6 Jan 2025 15:36:54 -0500 Subject: [PATCH] Austenem/Accessibility updates (#3648) * aria child roles * aria and lang updates * update search * detail page updates * update search menu * update toggle * update nested detail accordion * add changelog * clean up * review updates --- CHANGELOG-accessibility-updates.md | 1 + .../CollapsibleDetailPageSection.tsx | 7 +++++-- .../detailPage/MetadataSection/MetadataSection.tsx | 7 ++++--- .../js/components/detailPage/MetadataTable/style.ts | 8 +------- .../components/detailPage/StatusIcon/StatusIcon.tsx | 2 +- context/app/static/js/components/home/Hero/Hero.tsx | 2 +- .../js/components/search/Results/ResultsTiles.tsx | 8 ++++++++ context/app/static/js/components/search/Search.tsx | 2 +- .../app/static/js/components/search/SearchBar.tsx | 3 ++- .../js/components/workspaces/WorkspaceListItem.tsx | 4 +++- .../app/static/js/shared-styles/buttons/index.tsx | 7 ++++--- .../dropdowns/DropdownMenuButton/style.ts | 12 ++++++------ context/app/static/js/shared-styles/icons/icons.tsx | 2 +- .../tooltips/InfoTextTooltip/InfoTextTooltip.tsx | 2 +- 14 files changed, 39 insertions(+), 28 deletions(-) create mode 100644 CHANGELOG-accessibility-updates.md diff --git a/CHANGELOG-accessibility-updates.md b/CHANGELOG-accessibility-updates.md new file mode 100644 index 0000000000..fecfc331d9 --- /dev/null +++ b/CHANGELOG-accessibility-updates.md @@ -0,0 +1 @@ +- Resolve accessibility issues related to arias and interactive controls throughout the portal. \ No newline at end of file diff --git a/context/app/static/js/components/detailPage/DetailPageSection/CollapsibleDetailPageSection.tsx b/context/app/static/js/components/detailPage/DetailPageSection/CollapsibleDetailPageSection.tsx index e9779dc4cc..34c2d33677 100644 --- a/context/app/static/js/components/detailPage/DetailPageSection/CollapsibleDetailPageSection.tsx +++ b/context/app/static/js/components/detailPage/DetailPageSection/CollapsibleDetailPageSection.tsx @@ -64,6 +64,8 @@ export default function CollapsibleDetailPageSection({ )} + + {action && ( { @@ -72,12 +74,13 @@ export default function CollapsibleDetailPageSection({ }} ml="auto" className="accordion-section-action" + sx={{ position: 'absolute', right: 0, top: 7 }} > {action} )} - - {children} + {children} + ); diff --git a/context/app/static/js/components/detailPage/MetadataSection/MetadataSection.tsx b/context/app/static/js/components/detailPage/MetadataSection/MetadataSection.tsx index 03b0b6465d..c2ac72a988 100644 --- a/context/app/static/js/components/detailPage/MetadataSection/MetadataSection.tsx +++ b/context/app/static/js/components/detailPage/MetadataSection/MetadataSection.tsx @@ -11,7 +11,8 @@ import withShouldDisplay from 'js/helpers/withShouldDisplay'; import { sectionIconMap } from 'js/shared-styles/icons/sectionIconMap'; import { SectionDescription } from 'js/shared-styles/sections/SectionDescription'; import { getTableEntities } from 'js/components/detailPage/MetadataSection/utils'; -import { DownloadIcon, StyledWhiteBackgroundIconButton } from '../MetadataTable/style'; +import { WhiteBackgroundIconButton } from 'js/shared-styles/buttons'; +import { DownloadIcon } from '../MetadataTable/style'; import MetadataTabs from '../multi-assay/MultiAssayMetadataTabs'; import { Columns, defaultTSVColumns } from './columns'; @@ -54,12 +55,12 @@ function MetadataWrapper({ allTableRows, tsvColumns = defaultTSVColumns, childre action={ - trackEntityPageEvent({ action: `Metadata / Download Metadata` })} > - + } diff --git a/context/app/static/js/components/detailPage/MetadataTable/style.ts b/context/app/static/js/components/detailPage/MetadataTable/style.ts index 5cdc2a8e30..97d1ff627b 100644 --- a/context/app/static/js/components/detailPage/MetadataTable/style.ts +++ b/context/app/static/js/components/detailPage/MetadataTable/style.ts @@ -1,7 +1,5 @@ import { styled } from '@mui/material/styles'; import GetAppIcon from '@mui/icons-material/GetAppRounded'; - -import { WhiteBackgroundIconButton } from 'js/shared-styles/buttons'; import SectionHeader from 'js/shared-styles/sections/SectionHeader'; const DownloadIcon = styled(GetAppIcon)({ @@ -13,12 +11,8 @@ const Flex = styled('div')({ justifyContent: 'space-between', }); -const StyledWhiteBackgroundIconButton = styled(WhiteBackgroundIconButton)(({ theme }) => ({ - marginBottom: theme.spacing(0.5), -})); - const StyledSectionHeader = styled(SectionHeader)({ alignSelf: 'flex-end', }); -export { DownloadIcon, Flex, StyledWhiteBackgroundIconButton, StyledSectionHeader }; +export { DownloadIcon, Flex, StyledSectionHeader }; diff --git a/context/app/static/js/components/detailPage/StatusIcon/StatusIcon.tsx b/context/app/static/js/components/detailPage/StatusIcon/StatusIcon.tsx index cb43e6fed6..d959b1e8ef 100644 --- a/context/app/static/js/components/detailPage/StatusIcon/StatusIcon.tsx +++ b/context/app/static/js/components/detailPage/StatusIcon/StatusIcon.tsx @@ -44,7 +44,7 @@ const StatusIcon = forwardRef(function StatusIcon( if (tooltip) { return ( - + {/* The wrapper is required for the tooltip to work */} {content} diff --git a/context/app/static/js/components/home/Hero/Hero.tsx b/context/app/static/js/components/home/Hero/Hero.tsx index 5929afbec9..e25fe99012 100644 --- a/context/app/static/js/components/home/Hero/Hero.tsx +++ b/context/app/static/js/components/home/Hero/Hero.tsx @@ -80,7 +80,7 @@ const heroTabs = [ export default function Hero() { const [activeTab, setActiveTab] = useState(0); return ( - + {heroTabs.map((tab, index) => ( diff --git a/context/app/static/js/components/search/Results/ResultsTiles.tsx b/context/app/static/js/components/search/Results/ResultsTiles.tsx index 0037e03144..fbbaece914 100644 --- a/context/app/static/js/components/search/Results/ResultsTiles.tsx +++ b/context/app/static/js/components/search/Results/ResultsTiles.tsx @@ -5,6 +5,7 @@ import MenuItem from '@mui/material/MenuItem'; import FormControl from '@mui/material/FormControl'; import Select, { SelectChangeEvent } from '@mui/material/Select'; import ListItemIcon from '@mui/material/ListItemIcon'; +import InputLabel from '@mui/material/InputLabel'; import Check from '@mui/icons-material/Check'; import { Entity } from 'js/components/types'; @@ -14,6 +15,7 @@ import { capitalizeString } from 'js/helpers/functions'; import TileGrid from 'js/shared-styles/tiles/TileGrid'; import { useEntityTileAriaLabelText } from 'js/hooks/useEntityTileAriaLabel'; import { trackEvent } from 'js/helpers/trackers'; +import { StyledDownIcon } from 'js/shared-styles/dropdowns/DropdownMenuButton/style'; import { useSearch } from '../Search'; import ViewMoreResults from './ViewMoreResults'; import { useSearchStore } from '../store'; @@ -45,10 +47,16 @@ function TilesSortSelect() { return ( + + Sort by +