Skip to content

Commit

Permalink
fixed accesiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaBonde committed Aug 28, 2024
1 parent 81cf3f0 commit 4564d55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hemsedal24/components/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Files({ data }: any) {
{data.files.length > 0 ?
<div id="pictureContainer" className={styles.container}>
{data.files.map((file:any, index:number) =>
<div key={file.id} className={styles.image} onClick={()=>imageClicked(file.id, index)} onKeyDown={()=>imageClicked(file.id, index)}>
<div key={file.id} className={styles.image} onClick={()=>imageClicked(file.id, index)} tabIndex={index} role='picture' aria-label='open picture' onKeyDown={()=>imageClicked(file.id, index)}>

Check failure on line 29 in src/hemsedal24/components/Files.tsx

View workflow job for this annotation

GitHub Actions / eslint

Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element

Check failure on line 29 in src/hemsedal24/components/Files.tsx

View workflow job for this annotation

GitHub Actions / eslint

Elements with ARIA roles must use a valid, non-abstract ARIA role
<img src={`https://utfs.io/f/${file.key}`} alt={` ${file.name}`}/></div>)} </div> :<div className={styles.nopictures}><h4>Ingen bilder ennå!</h4></div>}

{isPopoverOpen && (
Expand Down

0 comments on commit 4564d55

Please sign in to comment.