Skip to content
Snippets Groups Projects
Commit 37789867 authored by Hayley Corson-Dosch's avatar Hayley Corson-Dosch
Browse files

Add aria role and attribute and make keydown event triggered by enter or space

parent 1ca032eb
No related branches found
No related tags found
1 merge request!79Fii edits
......@@ -300,12 +300,14 @@
// add tab-index selection and keypress events for fire markers
for (let i=0; i < 2; i++) {
d3.select(`#source-${i}`)
.attr('tabindex', 0)
.on("keypress", function(event) {
if(event.key == 'Enter'){
keypressFire(event)
}
})
.attr('tabindex', 0)
.attr("role", "button")
.attr("aria-label", i == 0 ? 'Dennison Fork 2015 wildfire' : 'Steamboat Creek 2016 wildfire')
.on("keydown", function(event) {
if(event.code == 'Enter' | event.code == 'Space'){
keypressFire(event)
}
})
}
// draw default line
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment