Skip to content

Commit

Permalink
fix(#900): Add missing aria-labels
Browse files Browse the repository at this point in the history
Add hasOverflowScroll to pageSections in JMX and Quartz.

(cherry picked from commit 4f57205)
  • Loading branch information
mmelko committed Apr 26, 2024
1 parent 6e04311 commit e588e7a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 27 deletions.
1 change: 1 addition & 0 deletions packages/hawtio/src/plugins/camel/CamelContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export const CamelContent: React.FunctionComponent = () => {
variant={pathname.includes('chart') ? PageSectionVariants.default : PageSectionVariants.light}
padding={{ default: pathname.includes('chart') ? 'padding' : 'noPadding' }}
hasOverflowScroll
aria-label='camel-content-main'
>
{navItems.length > 0 && (
<Routes>
Expand Down
3 changes: 3 additions & 0 deletions packages/hawtio/src/plugins/jmx/JmxContent.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#jmx-content-main > article {
overflow: auto;
}
#jmx-content {
height: 100%;
}
25 changes: 12 additions & 13 deletions packages/hawtio/src/plugins/jmx/JmxContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,29 +80,28 @@ export const JmxContent: React.FunctionComponent = () => {
))

return (
<React.Fragment>
<PageGroup>
<PageSection id='jmx-content-header' variant={PageSectionVariants.light}>
<Title headingLevel='h1'>{selectedNode.name}</Title>
<Text component='small'>{selectedNode.objectName}</Text>
</PageSection>
<Divider />
<PageSection type='tabs' variant={PageSectionVariants.light} hasShadowBottom>
{mbeanNav}
</PageSection>
<Divider />
</PageGroup>
<PageGroup id='jmx-content'>
<PageSection id='jmx-content-header' variant={PageSectionVariants.light}>
<Title headingLevel='h1'>{selectedNode.name}</Title>
<Text component='small'>{selectedNode.objectName}</Text>
</PageSection>
<Divider />
<PageSection type='tabs' variant={PageSectionVariants.light} hasShadowBottom>
{mbeanNav}
</PageSection>
<Divider />
<PageSection
id='jmx-content-main'
variant={pathname.includes('chart') ? PageSectionVariants.default : PageSectionVariants.light}
padding={{ default: pathname.includes('chart') ? 'padding' : 'noPadding' }}
hasOverflowScroll
aria-label='jmx-content-main'
>
<Routes>
{mbeanRoutes}
<Route key='root' path='/' element={<Navigate to={navItems[0]?.id ?? ''} />} />
</Routes>
</PageSection>
</React.Fragment>
</PageGroup>
)
}
4 changes: 4 additions & 0 deletions packages/hawtio/src/plugins/quartz/QuartzContent.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#quartz-content-main > article {
overflow: auto;
}

#quartz-content {
height: 100%;
}
33 changes: 19 additions & 14 deletions packages/hawtio/src/plugins/quartz/QuartzContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,29 @@ export const QuartzContent: React.FunctionComponent = () => {
const routes = navItems.map(nav => <Route key={nav.id} path={nav.id} element={React.createElement(nav.component)} />)

return (
<React.Fragment>
<PageGroup>
<PageSection id='quartz-content-header' variant={PageSectionVariants.light}>
<Title headingLevel='h1'>{selectedNode.name}</Title>
<Text component='small'>{selectedNode.objectName}</Text>
</PageSection>
<Divider />
<PageSection type='tabs' hasShadowBottom>
{nav}
</PageSection>
<Divider />
</PageGroup>
<PageSection variant='light' id='quartz-content-main' padding={{ default: 'noPadding' }}>
<PageGroup id='quartz-content'>
<PageSection id='quartz-content-header' variant={PageSectionVariants.light}>
<Title headingLevel='h1'>{selectedNode.name}</Title>
<Text component='small'>{selectedNode.objectName}</Text>
</PageSection>
<Divider />
<PageSection type='tabs' hasShadowBottom>
{nav}
</PageSection>
<Divider />

<PageSection
variant='light'
id='quartz-content-main'
padding={{ default: 'noPadding' }}
hasOverflowScroll
aria-label='quartz-content-main'
>
<Routes>
{routes}
<Route key='root' path='/' element={<Navigate to={navItems[0]?.id ?? ''} />} />
</Routes>
</PageSection>
</React.Fragment>
</PageGroup>
)
}

0 comments on commit e588e7a

Please sign in to comment.