Improve navigation and fix focus-visible colors in the popup #4

This commit is contained in:
Aljaž Grilc 2025-06-05 09:44:52 +02:00
parent e4ba4dd3f1
commit a04ffb3e70

View File

@ -361,8 +361,10 @@ class BesService {
e.stopPropagation() e.stopPropagation()
this.acceptReplacement() this.acceptReplacement()
} }
break
case 'Escape': case 'Escape':
this.dismissPopup() this.dismissPopup()
break
default: default:
break break
} }
@ -1176,7 +1178,7 @@ class BesService {
} }
/** /**
* This function calculates / finds the next mistake. * This function finds the next/previous mistake.
* @param {Number} direction Navigation direction: 1 for next, -1 for previous * @param {Number} direction Navigation direction: 1 for next, -1 for previous
* @returns * @returns
*/ */
@ -2925,6 +2927,12 @@ class BesPopup extends HTMLElement {
} }
.bes-replacement-btn:hover{ .bes-replacement-btn:hover{
background-color: #1976f0; background-color: #1976f0;
}
.bes-replacement-btn:focus{
outline: -webkit-focus-ring-color auto 1px;
}
.bes-replacement-btn:focus-visible{
outline: -webkit-focus-ring-color auto 1px;
} }
.bes-replacement-div{ .bes-replacement-div{
margin-top: 4px; margin-top: 4px;