Skip to content

Commit

Permalink
Merge pull request #1128 from csandman/fix-aria-attributes
Browse files Browse the repository at this point in the history
Fix ARIA attributes + Fix "Powered by Google" logo
  • Loading branch information
wellyshen authored Aug 10, 2023
2 parents 16c480c + 18e57fc commit 21ef1b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Binary file added app/public/powered_by_google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 7 additions & 11 deletions app/src/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ const App: FC = () => {
{suggestions}
<li className={styles.logo}>
<img
src="https://developers.google.com/maps/documentation/images/powered_by_google_on_white.png"
src="/powered_by_google.png"
alt="Powered by Google"
width="120"
/>
</li>
</>
Expand All @@ -119,15 +120,7 @@ const App: FC = () => {
<p className={styles.subtitle}>
React hook for Google Maps Places Autocomplete.
</p>
<div
className={styles.autocomplete}
ref={ref}
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
role="combobox"
aria-owns="ex-list-box"
aria-haspopup="listbox"
aria-expanded={hasSuggestions}
>
<div className={styles.autocomplete} ref={ref}>
<input
className={styles.input}
value={value}
Expand All @@ -136,8 +129,11 @@ const App: FC = () => {
disabled={!ready}
placeholder="WHERE ARE YOU GOING?"
type="text"
aria-autocomplete="list"
role="combobox"
aria-controls="ex-list-box"
aria-autocomplete="list"
aria-haspopup="listbox"
aria-expanded={hasSuggestions}
aria-activedescendant={
currIndex !== null ? `ex-list-item-${currIndex}` : undefined
}
Expand Down

0 comments on commit 21ef1b4

Please sign in to comment.