Skip to content

Commit

Permalink
refactor(location-field): Add comments for a11y requirements and assu…
Browse files Browse the repository at this point in the history
…mptions.
  • Loading branch information
binh-dam-ibigroup committed Jul 7, 2023
1 parent 245d68c commit 8475b09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/location-field/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ const LocationField = ({
return location && !hideExistingValue ? label : "";
};

// FIXME: This class name seems only used in OTP-RR for Percy tests to identify the component.
const formControlClassname = `${locationType}-form-control`;

// We assume there is only up to one location field component for each value in LocationType.
const listBoxId = `${locationType}-listbox`;

const intl = useIntl();
Expand Down Expand Up @@ -936,6 +938,8 @@ const LocationField = ({
value={statusMessages}
/>
</S.HiddenContent>
{/* The results list is always in the DOM (but hidden in desktop if no results are shown),
so that assistive technology can associate the list with the button and input controls. */}
<ItemList
aria-label={intl.formatMessage({
defaultMessage: "Suggested locations",
Expand Down

0 comments on commit 8475b09

Please sign in to comment.