Skip to content

Commit

Permalink
fix: remove <br> from Store Locator for a11y
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 688752839
  • Loading branch information
mcreinhard authored and copybara-github committed Oct 23, 2024
1 parent 6e7c93a commit 421ed05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/store_locator/store_locator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export class StoreLocator extends BaseComponent {
</div>
</button>
<div class="address">
${join(listing.addressLines ?? [], html`<br>`)}
${(listing.addressLines ?? []).map((line) => html`<p>${line}</p>`)}
</div>
<div class="actions">
${join(actionButtons, html``)}
Expand Down
4 changes: 4 additions & 0 deletions src/store_locator/store_locator_styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export const storeLocatorStyles = css`
margin-bottom: 0.5em;
}
#location-results-list .address p {
margin: 0;
}
#location-results-list gmpx-place-directions-button {
position: absolute;
right: 1.2em;
Expand Down

0 comments on commit 421ed05

Please sign in to comment.