Skip to content

Commit

Permalink
Merge branch 'main' into add-pccm-radio-3027
Browse files Browse the repository at this point in the history
  • Loading branch information
gmrabian committed Oct 16, 2023
2 parents f3f470b + 8c61b95 commit 74d92e0
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 30 deletions.
35 changes: 25 additions & 10 deletions services/ui-src/src/components/tables/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import {
// utils
import { sanitizeAndParseHtml } from "utils";
// types
import { AnyObject, TableContentShape } from "types";
import {
AnyObject,
ScreenReaderOnlyHeaderName,
TableContentShape,
} from "types";

export const Table = ({
content,
Expand All @@ -37,15 +41,26 @@ export const Table = ({
<Thead>
{/* Head Row */}
<Tr>
{content.headRow.map((headerCell: string, index: number) => (
<Th
key={index}
scope="col"
sx={{ ...sx.tableHeader, ...sxOverride }}
>
{sanitizeAndParseHtml(headerCell)}
</Th>
))}
{content.headRow.map(
(
headerCell: string | ScreenReaderOnlyHeaderName,
index: number
) => (
<Th
key={index}
scope="col"
sx={{ ...sx.tableHeader, ...sxOverride }}
>
{typeof headerCell === "object" ? (
<VisuallyHidden>
{sanitizeAndParseHtml(headerCell.hiddenName)}
</VisuallyHidden>
) : (
sanitizeAndParseHtml(headerCell)
)}
</Th>
)
)}
</Tr>
</Thead>
)}
Expand Down
6 changes: 5 additions & 1 deletion services/ui-src/src/types/other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ export interface InputChangeEvent extends React.ChangeEvent<HTMLInputElement> {}

export type { IconType } from "react-icons";

export interface ScreenReaderOnlyHeaderName {
hiddenName: string;
}

export interface TableContentShape {
caption?: string;
headRow?: string[];
headRow?: Array<string | ScreenReaderOnlyHeaderName>;
bodyRows?: string[][];
}

Expand Down
25 changes: 14 additions & 11 deletions services/ui-src/src/verbiage/pages/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-B/section-438.74",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.74 (link opens in new tab)",
},
},
{
Expand All @@ -29,7 +29,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-A/section-438.8#p-438.8(k)",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.8(k) (link opens in new tab)",
},
},
{
Expand All @@ -40,11 +40,12 @@ export default {
},
{
type: "externalLink",
content: "Learn more",
content: "Learn more about the Medical Loss Ratio report",
props: {
href: "https://www.medicaid.gov/medicaid/managed-care/guidance/medicaid-and-chip-managed-care-reporting/index.html#MLR",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label":
"Learn more about the Medical Loss Ratio report (link opens in new tab)",
},
},
{
Expand Down Expand Up @@ -74,7 +75,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-B/section-438.74",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.74 (link opens in new tab)",
},
},
{
Expand All @@ -89,7 +90,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-A/section-438.8#p-438.8(k)",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.8(k) (link opens in new tab)",
},
},
{
Expand All @@ -100,11 +101,12 @@ export default {
},
{
type: "externalLink",
content: "Learn more",
content: "Learn more about the Medical Loss Ratio report",
props: {
href: "https://www.medicaid.gov/medicaid/managed-care/guidance/medicaid-and-chip-managed-care-reporting/index.html#MLR",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label":
"Learn more about the Medical Loss Ratio report (link opens in new tab)",
},
},
{
Expand All @@ -131,7 +133,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-A/section-438.8#p-438.8(k)",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.8(k) (link opens in new tab)",
},
},
{
Expand All @@ -146,7 +148,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-A/section-438.8#p-438.8(l)",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.8(l) (link opens in new tab)",
},
},
{
Expand Down Expand Up @@ -174,7 +176,8 @@ export default {
props: {
href: "https://www.medicaid.gov/federal-policy-guidance/downloads/cib073117.pdf",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label":
"CMCS Informational Bulletin dated July 31, 2017 (link opens in new tab)",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
props: {
href: "https://www.medicaid.gov/medicaid/managed-care/guidance/medicaid-and-chip-managed-care-reporting/index.html#AMCPR",
target: "_blank",
"aria-label": "Learn more (link opens in new tab).",
"aria-label": "Learn more (link opens in new tab)",
},
},
],
Expand Down
6 changes: 3 additions & 3 deletions services/ui-src/src/verbiage/pages/mcpar/mcpar-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
props: {
href: "https://www.medicaid.gov/medicaid/managed-care/guidance/medicaid-and-chip-managed-care-reporting/index.html#AMCPR",
target: "_blank",
"aria-label": "Learn more (link opens in new tab).",
"aria-label": "Learn more (link opens in new tab)",
},
},
],
Expand All @@ -27,13 +27,13 @@ export default {
table: {
caption: "MCPAR Programs",
headRow: [
"",
{ hiddenName: "Edit report name and details" },
"Program name",
"Due date",
"Last edited",
"Edited by",
"Status",
"",
{ hiddenName: "Actions" },
],
},
empty:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
info: "Double check that everything in your MCPAR Report is accurate. You will be able to make edits after submitting, and resubmit. Once you’ve reviewed your report, certify that it’s in compliance with 42 CFR § 438.66(e).",
},
table: {
headRow: ["Section", "Status", ""],
headRow: ["Section", "Status", { hiddenName: "Actions" }],
},
modal: {
structure: {
Expand Down
4 changes: 2 additions & 2 deletions services/ui-src/src/verbiage/pages/mlr/mlr-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default {
table: {
caption: "MLR Submissions",
headRow: [
"",
{ hiddenName: "Edit report name" },
"Submission name",
"Last edited",
"Edited by",
"Status",
"#",
"",
{ hiddenName: "Actions" },
],
},
empty:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
props: {
href: "https://www.ecfr.gov/current/title-42/chapter-IV/subchapter-C/part-438/subpart-B/section-438.74",
target: "_blank",
ariaLabel: "Link opens in new tab",
"aria-label": "42 CFR § 438.74 (link opens in new tab)",
},
},
{
Expand All @@ -31,6 +31,9 @@ export default {
},
],
},
table: {
headRow: ["Section", "Status", { hiddenName: "Actions" }],
},
modal: {
structure: {
heading: "Are you sure you want to submit MLR?",
Expand Down

0 comments on commit 74d92e0

Please sign in to comment.