forked from cybrespace/pinafore
parent
3a7d887531
commit
9d706a3748
|
@ -5,6 +5,7 @@
|
||||||
class="{{hidden ? 'hidden' : ''}} {{className || ''}}"
|
class="{{hidden ? 'hidden' : ''}} {{className || ''}}"
|
||||||
aria-hidden="{{ariaHidden || ''}}"
|
aria-hidden="{{ariaHidden || ''}}"
|
||||||
alt="{{alt || ''}}"
|
alt="{{alt || ''}}"
|
||||||
|
title="{{alt || ''}}"
|
||||||
src="{{displaySrc}}"
|
src="{{displaySrc}}"
|
||||||
:width
|
:width
|
||||||
:height
|
:height
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
/>
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<LazyImage
|
<LazyImage
|
||||||
alt="{{label}}"
|
alt="{{label || ''}}"
|
||||||
|
title="{{label || ''}}"
|
||||||
src="{{staticSrc}}"
|
src="{{staticSrc}}"
|
||||||
fallback="{{oneTransparentPixel}}"
|
fallback="{{oneTransparentPixel}}"
|
||||||
:width
|
:width
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
{{#if staticSrc === src}}
|
{{#if staticSrc === src}}
|
||||||
<img class="{{className || ''}}"
|
<img class="{{className || ''}}"
|
||||||
aria-hidden="{{ariaHidden}}"
|
aria-hidden="{{ariaHidden}}"
|
||||||
alt="{{alt}}"
|
alt="{{alt || ''}}"
|
||||||
|
title="{{alt || ''}}"
|
||||||
src="{{src}}"
|
src="{{src}}"
|
||||||
on:imgLoadError />
|
on:imgLoadError />
|
||||||
{{else}}
|
{{else}}
|
||||||
<img class="{{className || ''}} non-autoplay-zoom-in {{isLink ? 'is-link' : ''}}"
|
<img class="{{className || ''}} non-autoplay-zoom-in {{isLink ? 'is-link' : ''}}"
|
||||||
aria-hidden="{{ariaHidden}}"
|
aria-hidden="{{ariaHidden}}"
|
||||||
alt="{{alt}}"
|
alt="{{alt || ''}}"
|
||||||
|
title="{{alt || ''}}"
|
||||||
src="{{staticSrc}}"
|
src="{{staticSrc}}"
|
||||||
on:imgLoadError
|
on:imgLoadError
|
||||||
on:mouseover="onMouseOver(event)"
|
on:mouseover="onMouseOver(event)"
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
width="{{width}}"
|
width="{{width}}"
|
||||||
height="{{height}}"
|
height="{{height}}"
|
||||||
alt="{{description || ''}}"
|
alt="{{description || ''}}"
|
||||||
|
title="{{description || ''}}"
|
||||||
/>
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
>
|
>
|
||||||
<PlayVideoIcon />
|
<PlayVideoIcon />
|
||||||
<LazyImage
|
<LazyImage
|
||||||
alt="{{media.description}}"
|
alt="{{media.description || ''}}"
|
||||||
|
title="{{media.description || ''}}"
|
||||||
src="{{media.preview_url}}"
|
src="{{media.preview_url}}"
|
||||||
fallback="{{oneTransparentPixel}}"
|
fallback="{{oneTransparentPixel}}"
|
||||||
width="{{inlineWidth}}"
|
width="{{inlineWidth}}"
|
||||||
|
@ -46,7 +47,8 @@
|
||||||
/>
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<LazyImage
|
<LazyImage
|
||||||
alt="{{media.description}}"
|
alt="{{media.description || ''}}"
|
||||||
|
title="{{media.description || ''}}"
|
||||||
src="{{media.preview_url}}"
|
src="{{media.preview_url}}"
|
||||||
fallback="{{oneTransparentPixel}}"
|
fallback="{{oneTransparentPixel}}"
|
||||||
width="{{inlineWidth}}"
|
width="{{inlineWidth}}"
|
||||||
|
|
|
@ -25,7 +25,9 @@ test('uploads alts for media', async t => {
|
||||||
.typeText(getNthMediaAltInput(1), 'kitten 1')
|
.typeText(getNthMediaAltInput(1), 'kitten 1')
|
||||||
.click(composeButton)
|
.click(composeButton)
|
||||||
.expect(getNthStatusAndImage(0, 0).getAttribute('alt')).eql('kitten 1')
|
.expect(getNthStatusAndImage(0, 0).getAttribute('alt')).eql('kitten 1')
|
||||||
|
.expect(getNthStatusAndImage(0, 0).getAttribute('title')).eql('kitten 1')
|
||||||
.expect(getNthStatusAndImage(0, 1).getAttribute('alt')).eql('kitten 2')
|
.expect(getNthStatusAndImage(0, 1).getAttribute('alt')).eql('kitten 2')
|
||||||
|
.expect(getNthStatusAndImage(0, 1).getAttribute('title')).eql('kitten 2')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('uploads alts when deleting and re-uploading media', async t => {
|
test('uploads alts when deleting and re-uploading media', async t => {
|
||||||
|
|
Loading…
Reference in New Issue