diff --git a/frontend/scss/style.scss b/frontend/scss/style.scss
index ab55318..14fd295 100644
--- a/frontend/scss/style.scss
+++ b/frontend/scss/style.scss
@@ -225,7 +225,8 @@ h2 {
cursor: pointer;
text-decoration: underline;
- li:hover & {
+ li:hover &,
+ li:focus-within & {
display: inline;
}
}
diff --git a/frontend/src/component.jsx b/frontend/src/component.jsx
index 00531e1..9f64541 100644
--- a/frontend/src/component.jsx
+++ b/frontend/src/component.jsx
@@ -251,6 +251,10 @@ const App = () => {
}, []);
const handleStyleItemLinkClick = useCallback((e) => {
+ if (e.type === 'keydown' && !(e.key == 'Enter' || e.key == ' ')) {
+ return;
+ }
+ e.preventDefault();
const styleName = e.target.closest('li').dataset.name;
if (styleName) {
dispatch({ type: 'QUERY', query: { search: `id:${styleName}` } });
@@ -488,7 +492,7 @@ const StyleItem = ({ style, onMouseEnter, onMouseLeave, onLinkClick }) => {
{style.title}
({style.updated})
-
+
Link