Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ function FavouritesTable({
</div>

<div className="hidden overflow-x-auto sm:block">
<table className="min-w-[36rem] w-full border-collapse text-left">
<table aria-label="Saved favourites" className="min-w-[36rem] w-full border-collapse text-left">
<thead>
<tr className="h-10 border-b border-[color:var(--border)] bg-[color:var(--surface)] text-2xs font-semibold uppercase tracking-[0.08em] text-[color:var(--text-muted)]">
<th scope="col" className="min-w-[12rem] px-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ export function FavouritesSidebar({
<Heart className="h-4 w-4 group-hover:hidden group-focus-visible:hidden" aria-hidden />
<PanelLeftOpen className="hidden h-4 w-4 group-hover:block group-focus-visible:block" aria-hidden />
</button>
<nav className="flex min-h-0 flex-1 flex-col items-center gap-1 overflow-y-auto px-2 pb-2">
<nav
aria-label="Favourites library"
className="flex min-h-0 flex-1 flex-col items-center gap-1 overflow-y-auto px-2 pb-2"
>
{sections.map((section, sectionIndex) => (
<span key={section.id} className="contents">
{sectionIndex > 0 ? <span className="my-1 h-px w-8 bg-[color:var(--border)]" aria-hidden /> : null}
Expand Down Expand Up @@ -317,7 +320,7 @@ export function FavouritesSidebar({
<PanelLeftClose className="h-4 w-4" aria-hidden />
</button>
</div>
<nav className="grid gap-5">
<nav aria-label="Favourites sections" className="grid gap-5">
{sections.map((section) => (
<section key={section.id}>
<h3 className="mb-2 text-2xs font-semibold uppercase tracking-[0.08em] text-[color:var(--text-muted)]">
Expand Down
9 changes: 5 additions & 4 deletions src/components/clinical-dashboard/mode-action-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,10 @@ export function ModeActionPopup({
const integratedDownOffsetClass = integratedChipRow ? "top-[calc(100%+3.65rem)]" : "top-[calc(100%+0.875rem)]";

// Shared, presentation-agnostic action list — the same rows render inside the
// desktop popover and the phone/tablet sheet. Each row's accessible name is its
// `label`; the secondary description is exposed via aria-describedby (kept out of
// the name so exact-match tests like "Scope"/"Upload PDF" hold).
// desktop popover and the phone/tablet sheet. Each row's accessible name is set
// via aria-label to the `label` only; the visible secondary description is linked
// with aria-describedby (and must not use aria-hidden, which conflicts with it).
// That keeps exact-match queries like "Scope"/"Upload PDF" stable.
function renderActionRows() {
return (
<div
Expand All @@ -619,6 +620,7 @@ export function ModeActionPopup({
ref={(element) => assignActionRef(element, index)}
type="button"
role="menuitem"
aria-label={item.label}
aria-describedby={descriptionId}
onKeyDown={(event) => handleItemKeyDown(event, index)}
onClick={() => runActionAndClose(item.id)}
Expand Down Expand Up @@ -648,7 +650,6 @@ export function ModeActionPopup({
{item.description ? (
<span
id={descriptionId}
aria-hidden="true"
className="mt-0.5 block truncate text-xs font-medium text-[color:var(--text-soft)]"
>
{item.description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export function SourcePreviewPopover({
return createPortal(
<div
ref={surfaceRef}
tabIndex={-1}
role="dialog"
aria-modal="false"
aria-label={title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,24 @@ function DesktopComparisonTable({
data-testid="differential-comparison-scroll"
className="polished-scroll overflow-x-auto rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] shadow-[var(--shadow-soft)]"
>
<table className="min-w-[84rem] border-separate border-spacing-0 text-left">
<table
aria-label="Differential comparison"
className="min-w-[84rem] border-separate border-spacing-0 text-left"
>
<thead>
<tr>
<th className="sticky left-0 z-10 w-[10.75rem] border-b border-r border-[color:var(--border)] bg-[color:var(--clinical-chat-table-header)] px-3.5 py-3 align-top text-xs font-extrabold uppercase text-[color:var(--text-muted)]">
<th
scope="col"
className="sticky left-0 z-10 w-[10.75rem] border-b border-r border-[color:var(--border)] bg-[color:var(--clinical-chat-table-header)] px-3.5 py-3 align-top text-xs font-extrabold uppercase text-[color:var(--text-muted)]"
>
Criteria
<span className="mt-1.5 block text-2xs font-bold normal-case text-[color:var(--text-muted)]">
Reorder
</span>
</th>
{candidates.map((candidate) => (
<th
scope="col"
key={candidate.record.slug}
className={cn(
"w-[8.5rem] border-b border-r border-[color:var(--border)] bg-[color:var(--clinical-chat-table-header)] p-0 align-top",
Expand All @@ -244,7 +251,10 @@ function DesktopComparisonTable({
<tbody>
{workflow.criteria.map((criterion) => (
<tr key={criterion.id} className={rowTone[criterion.tone]}>
<th className="sticky left-0 z-10 w-[10.75rem] border-b border-r border-[color:var(--border)] bg-inherit px-3.5 py-3 align-top">
<th
scope="row"
className="sticky left-0 z-10 w-[10.75rem] border-b border-r border-[color:var(--border)] bg-inherit px-3.5 py-3 align-top"
>
<CriteriaLabel criterion={criterion} />
</th>
{candidates.map((candidate) => (
Expand Down