What is a suitable WAI-ARIA role attribute for a map element

后端 未结 2 1855
萌比男神i
萌比男神i 2021-01-05 04:38

In my webpage, I have half of it being a map display using Google maps. What aria-role should I add to that canvas element which is displaying the

2条回答
  •  庸人自扰
    2021-01-05 05:18

    Is a Google Map something accessible for blind people? No.

    The answer to that question give you some clue : give it the presentation role and aria-hidden=true attribute. You should give a correct replacement for the missing information like a full textual itinerary if your map describe an itinerary.

    Eg:

    
    
    Visit us at our store, Penny Lane, 22, Liverpool
    Liverpool City bus, Line 3

    Note: Widget is an abstract role you can't give to an element.

    EDIT: This will remove the ability for a screenreader to interact with the canvas, both from keyboard and mouse, which may not be suitable for illiterate people using a screenreader for instance (when the canvas has better accessibility features than Google Maps'). If you really want to give access to an accessible canvas, do not change the native semantic, otherwise, in this case, place a link before to jump the canvas, specifying that it has very uninuitive keyboard support and may not work with the mouse.

提交回复
热议问题