Open bfabio opened 7 months ago
Update: this PR https://github.com/italia/designers.italia.it/pull/1112 fixed half of the warnings as you can see:
@bfabio I leave the correction of :
Finally I have a couple of doubts about media-player.js, perhaps we should consider disabling this lint:
useEffect
as you can see here:if (subtitles)
video.player.addRemoteTextTrack({
kind: "subtitles",
label: "Italiano",
srclang: "it",
default: true,
src: subtitles,
});
Update: we need to investigate further the warning A form label must be associated with a control jsx-a11y/label-has-associated-control
beause each labels seems to have its correct htmlFor
property...
⚠️ I have also found a potential a11y bug of Bootstrap Italia @astagi here: https://github.com/italia/designers.italia.it/commit/44db4306bc4dd66e2c93fad5271a028587334c7b . There was an <a>
instead of the correct <button>
semantic for the close action of the mobile version of the nav-sidebar...
Update: just open an issue on Bootstrap italia: https://github.com/italia/bootstrap-italia/issues/1029
@bfabio I just updated the comment above after merging the PR that fix half of the warnings.
Finally I have a couple of doubts about media-player.js, perhaps we should consider disabling this lint:
some of the old archive media we retrieved are without subtitles;
however, for the new ones, we load subtitles via the dedicated API method of video.js (line 53) within
useEffect
as you can see here:if (subtitles) video.player.addRemoteTextTrack({ kind: "subtitles", label: "Italiano", srclang: "it", default: true, src: subtitles, });
Thinking about it, videos not having the subtitles should be handled as an error IMO. So, the possible steps:
There are a few linting warning remaining that pollute our
npm run lint
output and are most likely symptoms of actual bugs , we should fix those - preferably not by disabling them: