Skip to content

Commit

Permalink
feat: a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 9, 2020
1 parent 6f06e65 commit 1732d62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/runtime/nuxt-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export default {
transform: 'scale(1.1)'
},
attrs: {
src: this.meta.placeholder
src: this.meta.placeholder,
'aria-hidden': 'true'
}
})
}
Expand Down Expand Up @@ -110,6 +111,9 @@ export default {

const ratioBox = h('div', {
class: '__nim_r',
attrs: {
'aria-hidden': 'true'
},
style: {
width: '100%',
paddingBottom: this.imageRatio ? `${this.imageRatio}%` : undefined
Expand Down
6 changes: 5 additions & 1 deletion src/runtime/nuxt-picture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export default {
transform: 'scale(1.1)'
},
attrs: {
src: this.meta.placeholder
src: this.meta.placeholder,
'aria-hidden': 'true'
}
})
}
Expand Down Expand Up @@ -125,6 +126,9 @@ export default {

const ratioBox = h('div', {
class: '__nim_r',
attrs: {
'aria-hidden': 'true'
},
style: {
paddingBottom: this.imageRatio ? `${this.imageRatio}%` : undefined
}
Expand Down

0 comments on commit 1732d62

Please sign in to comment.