Skip to content

Commit

Permalink
add placeholder for grab handle aria label
Browse files Browse the repository at this point in the history
  • Loading branch information
anakaren-rojas committed Jan 15, 2025
1 parent 1206856 commit d070c09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/perseus/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export type PerseusStrings = {
}: {
countOfSegments: number;
}) => string;
srIndividualSegmentAriaLabel: string;
srIndividualSegmentAriaDescription: ({
point1X,
point1Y,
Expand Down Expand Up @@ -522,6 +523,7 @@ export const strings: {
srSingleSegmentGraphAriaLabel: "A line segment on a coordinate plane.",
srMultipleSegmentGraphAriaLabel:
"%(countOfSegments)s segments on a coordinate plane.",
srIndividualSegmentAriaLabel: "PLACEHOLDER: PLEASE UPDATE ME",
srIndividualSegmentAriaDescription:
"Segment %(indexOfSegment)s: Endpoint 1 at %(point1X)s comma %(point1Y)s. Endpoint 2 %(point2X)s comma %(point2Y)s. Segment length %(length)s units.",
srSingleSegmentGraphEndpointAriaLabel:
Expand Down Expand Up @@ -748,6 +750,7 @@ export const mockStrings: PerseusStrings = {
srSingleSegmentGraphAriaLabel: "A line segment on a coordinate plane.",
srMultipleSegmentGraphAriaLabel: ({countOfSegments}) =>
`${countOfSegments} segments on a coordinate plane.`,
srIndividualSegmentAriaLabel: "PLACEHOLDER: PLEASE UPDATE ME",
srIndividualSegmentAriaDescription: ({
point1X,
point1Y,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const SegmentGraph = ({dispatch, graphState}: SegmentProps) => {
}

const wholeSegmentGraphAriaLabel = getWholeSegmentGraphAriaLabel();
// STRING FOR THIS SHOULD BE UPDATED PRIOR TO BEING TRANSLATED
const individualSegmentAriaLabel = strings.srIndividualSegmentAriaLabel;

function getIndividualSegmentAriaDescription(
segment: PairOfPoints,
Expand Down Expand Up @@ -95,6 +97,7 @@ const SegmentGraph = ({dispatch, graphState}: SegmentProps) => {
>
{segments?.map((segment, i) => (
<g
aria-label={individualSegmentAriaLabel}
aria-describedby={`segment-description-${segmentUniqueId}-${i}`}
key={`${segmentUniqueId}-${i}`}
>
Expand Down

0 comments on commit d070c09

Please sign in to comment.