Skip to content

Commit 51c06f5

Browse files
authored
add titles to accessibility sample (#340)
1 parent 20f3872 commit 51c06f5

File tree

1 file changed

+4
-4
lines changed
  • samples/3d-accessibility-features

1 file changed

+4
-4
lines changed

samples/3d-accessibility-features/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ async function initMap() {
4747
scale: 1.5,
4848
glyphColor: "#FFFFFF"
4949
});
50-
const popover = new PopoverElement({
51-
open: true,
52-
});
50+
const popover = new PopoverElement();
5351

5452
const content = `${i + 1}. ${title}`;
5553
const header = document.createElement('span');
5654
// Include the label for screen readers.
5755
header.ariaLabel = `This is marker ${i + 1}. ${title}`;
5856
header.slot = 'header';
5957

60-
popover.append(header);
58+
popover.append(header);
6159
popover.append(content);
6260

6361
const interactiveMarker = new Marker3DInteractiveElement({
62+
// Include a title, used for accessibility text for use by screen readers.
63+
title,
6464
position,
6565
gmpPopoverTargetElement: popover
6666
});

0 commit comments

Comments
 (0)