Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3f1e033
Update heading tags in various page elements for better accessibility
labkey-susanh May 1, 2026
d4ec16d
@labkey/components v7.33.4-pageStructure.0
labkey-susanh May 1, 2026
9f25aff
Missing label reference
labkey-susanh May 1, 2026
c87353c
@labkey/components v7.33.4-pageStructure.1
labkey-susanh May 1, 2026
c464054
Merge from develop and update to @labkey/components v7.33.5-pageStruc…
labkey-susanh May 4, 2026
ea359aa
Add sr-only text for Selection checkbox table header
labkey-susanh May 4, 2026
7cb2442
@labkey/components v7.33.5-pageStructure.2
labkey-susanh May 4, 2026
ec72349
Update styling for panel-heading in panel
labkey-susanh May 5, 2026
c546c29
@labkey/components v7.33.5-pageStructure.3
labkey-susanh May 5, 2026
24a1ac2
Revert restyling of panel-heading in panel
labkey-susanh May 5, 2026
c9a11a1
@labkey/components v7.33.5-pageStructure.4
labkey-susanh May 5, 2026
e7a8cd9
Merge remote-tracking branch 'origin/develop' into fb_pageStructure
labkey-susanh May 5, 2026
79dadd4
Add section-heading class for biologics settings sequence setting panel
labkey-susanh May 5, 2026
debc544
Add section-heading class for biologics settings sequence setting panel
labkey-susanh May 5, 2026
9bf8e53
Adjust styling for app-page-header__subtitle to use div instead of h4
labkey-susanh May 5, 2026
431f110
@labkey/components v7.34.1-pageStructure.5
labkey-susanh May 5, 2026
bc801a8
Field designer header updates to use h2 and h3 (CollapsiblePanelHeade…
cnathe May 6, 2026
7ed5beb
Field designer header updates to jest tests to match
cnathe May 6, 2026
6148c04
7.34.1-pageStructure.6
cnathe May 6, 2026
dcf580e
Merge branch 'develop' into fb_pageStructure
cnathe May 6, 2026
1a758d9
Another round of color contrast changes / updates
cnathe May 6, 2026
93b3354
7.34.1-pageStructure.7
cnathe May 6, 2026
5419486
Move heading styles here from ui-premium
labkey-susanh May 7, 2026
8d41ede
Merge from develop
labkey-susanh May 7, 2026
fc6b32f
@labkey/components v7.35.1-pageStructure.8
labkey-susanh May 7, 2026
73d1566
Move the heading styles to panel.scss, used by the apps
labkey-susanh May 8, 2026
d3feafe
Use H2 style like H4 instead of H4 to avoid skipping header levels
labkey-susanh May 8, 2026
11813d9
@labkey/components v7.35.1-pageStructure.9
labkey-susanh May 8, 2026
edcaeb9
merge from develop and update to @labkey/components v7.35.2-pageStruc…
labkey-susanh May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "7.35.1",
"version": "7.35.2-pageStructure.9",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
6 changes: 6 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version TBD
*Released*: TBD
- Update heading tags in various page elements for better accessibility
- Add sr-only text for Selection checkbox table header
- Update a few more colors for better contrast

### version 7.35.0
*Released*: 7 May 2026
- Fix accessibility issues for empty links and buttons
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/internal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ModalHeader: FC<ModalHeaderProps> = ({ title, onCancel }) => {
<span className="sr-only">Close</span>
</button>
)}
{title && <h4 className="modal-title text__wrap">{title}</h4>}
{title && <h2 className="modal-title text__wrap">{title}</h2>}
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ export const SpecialtyAssayPanel: FC<SpecialtyAssayPanelProps> = memo(props => {
<div className="col-xs-6">
{selected && options?.length > 0 && (
<>
<div className="margin-bottom">
<div className="margin-bottom" id="specialty-assay-type-select-label">
<b>Use Instrument-Specific Data Format</b>
</div>
<div className="margin-bottom">
<select
aria-labelledby="specialty-assay-type-select-label"
id="specialty-assay-type-select"
value={selected.name}
onChange={onSelectChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class AuditDetails extends Component<Props> {

return (
<div className="panel panel-default">
<div className="panel-heading">{title}</div>
<h2 className="panel-heading">{title}</h2>
<div className="panel-body">
{children}
{!rowId && <div>{emptyMsg}</div>}
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/internal/components/base/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ export class GridHeader extends PureComponent<GridHeaderProps, State> {
onDrop={this.handleDrop}
title={hideTooltip ? undefined : description}
>
{column.index === '__selection__' && (
<span className="sr-only">Selection checkboxes</span>
)}
{headerCell && headerCell(column, i, columns.size)}
{!headerCell && (
<div className={GRID_HEADER_CELL_BODY}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PageHeader } from './PageHeader';
describe('<PageHeader />', () => {
test('render without properties', () => {
render(<PageHeader showNotifications={false} />);
expect(document.querySelector('h2').textContent).toEqual('');
expect(document.querySelector('h2')).not.toBeInTheDocument();
});

test('render with icon', () => {
Expand All @@ -28,6 +28,13 @@ describe('<PageHeader />', () => {
expect(document.querySelector('h2').textContent).toEqual(' Page title');
});


test('render with icon and title as primary', () => {
render(<PageHeader primaryHeader showNotifications={false} title="Page title" iconCls="fa fa-star" />);
expect(document.querySelectorAll('span.fa-star').length).toEqual(1);
expect(document.querySelector('h1').textContent).toEqual(' Page title');
});

test('render with children', () => {
render(
<PageHeader showNotifications={false} title="render with children">
Expand Down
40 changes: 30 additions & 10 deletions packages/components/src/internal/components/base/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,40 @@ import { Notifications } from '../notifications/Notifications';

interface PageHeaderProps extends PropsWithChildren {
iconCls?: string;
primaryHeader?: boolean;
showNotifications?: boolean;
title?: string;
}

export const PageHeader: FC<PageHeaderProps> = ({ children, iconCls, showNotifications = true, title }) => (
<div className="page-header">
{children}
export const PageHeader: FC<PageHeaderProps> = ({
children,
iconCls,
primaryHeader,
showNotifications = true,
title,
}) => {
const showTitle = !!iconCls || !!title;

<h2 className="no-margin-top">
{iconCls ? <span className={'page-header-icon ' + iconCls}>&nbsp;</span> : null}
{title}
</h2>
return (
<div className="page-header">
{children}

{showTitle && primaryHeader && (
<h1 className="no-margin-top">
{iconCls ? <span className={'page-header-icon ' + iconCls}>&nbsp;</span> : null}
{title}
</h1>
)}
{showTitle && !primaryHeader && (
<h2 className="no-margin-top">
{iconCls ? <span className={'page-header-icon ' + iconCls}>&nbsp;</span> : null}
{title}
</h2>
)}

{showNotifications && <Notifications />}
</div>
);
};

{showNotifications && <Notifications />}
</div>
);
PageHeader.displayName = 'PageHeader';
11 changes: 8 additions & 3 deletions packages/components/src/internal/components/base/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ export const Section: FC<SectionProps> = props => {
{showHeader && (
<div className={`panel-heading panel-content-flex panel-content-${titleSize}`}>
<div className={`panel-content-title-container ${titleContainerClassName ?? ''}`}>
{title && (
<div className={`panel-content-title-${titleSize} ${titleClassName ?? ''}`}>
{title && titleSize === 'large' && (
<h1 className={`panel-content-title-${titleSize} ${titleClassName ?? ''}`}>
{title}
</div>
</h1>
)}
{title && titleSize !== 'large' && (
<h2 className={`panel-content-title-${titleSize} ${titleClassName ?? ''}`}>
{title}
</h2>
)}
{caption && <div className="panel-content-caption">{caption}</div>}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class CollapsiblePanelHeader extends React.PureComponent<Props> {
{panelStatus && panelStatus !== 'NONE' && !iconHelpMsg && this.getHeaderIconComponent()}

{/* Header name*/}
<span className="domain-panel-title">{this.getTitlePrefix() + title}</span>
<h2 className="domain-panel-title">{this.getTitlePrefix() + title}</h2>

{/* Expand/Collapse Icon*/}
{(controlledCollapse || collapsible) && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ type Props = {

export const DomainFieldsDisplay: FC<Props> = ({ domain, title }) => (
<div className="panel panel-default">
<div className="panel-heading">
<h2 className="panel-heading">
<div className="panel-title">{title || domain.name}</div>
</div>
</h2>
<div className="panel-body">
<p>{domain.description}</p>
<Grid columns={DOMAIN_FIELD_COLS} data={domain.fields} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ interface Props {
}

export const SectionHeading: FC<Props> = memo(props => (
<div className={'domain-field-section-heading' + (props.cls ? ' ' + props.cls : '')} id={props.id}>
<h3 className={'domain-field-section-heading' + (props.cls ? ' ' + props.cls : '')} id={props.id}>
{props.title}
{props.helpTipBody && <LabelHelpTip title={props.title}>{props.helpTipBody}</LabelHelpTip>}
</div>
</h3>
));

SectionHeading.displayName = 'SectionHeading';
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ exports[`<CollapsiblePanelHeader/> custom properties 1`] = `
class="fa fa-check-circle"
/>
</span>
<span
<h2
class="domain-panel-title"
>
Test Prefix - Test Title
</span>
</h2>
<span
class="pull-right"
>
Expand All @@ -40,11 +40,11 @@ exports[`<CollapsiblePanelHeader/> default properties 1`] = `
class="domain-panel-header panel-heading domain-heading-collapsible domain-panel-header-collapsed"
id="test-id"
>
<span
<h2
class="domain-panel-title"
>
Test Title
</span>
</h2>
<span
class="pull-right"
>
Expand All @@ -69,11 +69,11 @@ exports[`<CollapsiblePanelHeader/> invalid, iconHelpMsg, and expanded 1`] = `
class="fa fa-check-circle"
/>
</span>
<span
<h2
class="domain-panel-title"
>
Test Title
</span>
</h2>
<span
class="pull-right"
>
Expand All @@ -91,11 +91,11 @@ exports[`<CollapsiblePanelHeader/> not collapsible 1`] = `
class="domain-panel-header panel-heading domain-panel-header-expanded domain-panel-header-no-theme"
id="test-id"
>
<span
<h2
class="domain-panel-title"
>
Test Title
</span>
</h2>
</div>
</div>
`;
Expand All @@ -113,11 +113,11 @@ exports[`<CollapsiblePanelHeader/> not controlledCollapse 1`] = `
class="fa fa-check-circle"
/>
</span>
<span
<h2
class="domain-panel-title"
>
Test Title
</span>
</h2>
</div>
</div>
`;
Expand All @@ -143,11 +143,11 @@ exports[`<CollapsiblePanelHeader/> panelStatus TODO and help tip 1`] = `
</span>
</span>
</div>
<span
<h2
class="domain-panel-title"
>
Test Title
</span>
</h2>
<span
class="pull-right"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ exports[`ConditionalFormattingAndValidation Multiple validators or formats, cond
<div
class="col-xs-12"
>
<div
<h3
class="domain-field-section-heading domain-field-section-hdr"
>
Conditional Formatting and Validation Options
</div>
</h3>
</div>
</div>
<div
Expand Down Expand Up @@ -121,11 +121,11 @@ exports[`ConditionalFormattingAndValidation No validators 1`] = `
<div
class="col-xs-12"
>
<div
<h3
class="domain-field-section-heading domain-field-section-hdr"
>
Conditional Formatting Options
</div>
</h3>
</div>
</div>
<div
Expand Down Expand Up @@ -191,11 +191,11 @@ exports[`ConditionalFormattingAndValidation string field 1`] = `
<div
class="col-xs-12"
>
<div
<h3
class="domain-field-section-heading domain-field-section-hdr"
>
Conditional Formatting and Validation Options
</div>
</h3>
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ exports[`DomainFieldsDisplay with empty domain design 1`] = `
<div
class="panel panel-default"
>
<div
<h2
class="panel-heading"
>
<div
class="panel-title"
/>
</div>
</h2>
<div
class="panel-body"
>
Expand Down Expand Up @@ -118,15 +118,15 @@ exports[`DomainFieldsDisplay with title 1`] = `
<div
class="panel panel-default"
>
<div
<h2
class="panel-heading"
>
<div
class="panel-title"
>
test domain title
</div>
</div>
</h2>
<div
class="panel-body"
>
Expand Down Expand Up @@ -233,15 +233,15 @@ exports[`DomainFieldsDisplay without title 1`] = `
<div
class="panel panel-default"
>
<div
<h2
class="panel-heading"
>
<div
class="panel-title"
>
test domain name
</div>
</div>
</h2>
<div
class="panel-body"
>
Expand Down
Loading