fixes from jon
This commit is contained in:
parent
710c2942fa
commit
90adf799ac
6 changed files with 22 additions and 8 deletions
|
|
@ -9,7 +9,7 @@ export type ContainerWidth = 'narrower' | 'narrow' | 'normal' | 'wide' | 'wider'
|
|||
* A step in the Scroller component.
|
||||
*/
|
||||
export interface ScrollerStep {
|
||||
altText: string;
|
||||
altText?: string;
|
||||
/**
|
||||
* A background component
|
||||
* @required
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@
|
|||
<div class="empty-step-foreground step-{index + 1}"></div>
|
||||
|
||||
{#if typeof step.altText === 'string'}
|
||||
<p class="background-alt-text visually-hidden">{step.altText}</p>
|
||||
<div class="background-alt-text visually-hidden">
|
||||
{@html marked.parse(step.altText)}
|
||||
</div>
|
||||
{/if}
|
||||
{:else if typeof step.foreground === 'string'}
|
||||
<Block cls="body-text step-{index + 1}">
|
||||
|
|
@ -22,7 +24,9 @@
|
|||
</div>
|
||||
|
||||
{#if typeof step.altText === 'string'}
|
||||
<p class="background-alt-text visually-hidden">{step.altText}</p>
|
||||
<div class="background-alt-text visually-hidden">
|
||||
{@html marked.parse(step.altText)}
|
||||
</div>
|
||||
{/if}
|
||||
</Block>
|
||||
{:else}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
<!-- Empty foreground -->
|
||||
<div class="empty-step-foreground"></div>
|
||||
{#if typeof step.altText === 'string'}
|
||||
<p class="background-alt-text visually-hidden">{step.altText}</p>
|
||||
<div class="background-alt-text visually-hidden">
|
||||
{@html marked.parse(step.altText)}
|
||||
</div>
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="step-foreground">
|
||||
|
|
@ -26,7 +28,9 @@
|
|||
{/if}
|
||||
</div>
|
||||
{#if typeof step.altText === 'string'}
|
||||
<p class="background-alt-text visually-hidden">{step.altText}</p>
|
||||
<div class="background-alt-text visually-hidden">
|
||||
{@html marked.parse(step.altText)}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { ComponentType } from 'svelte';
|
||||
|
||||
interface BlockStep {
|
||||
AltText: string;
|
||||
AltText?: string;
|
||||
Background: string;
|
||||
Text: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,19 +52,21 @@ Step1Text: #### Step 1
|
|||
Lorem Ipsum
|
||||
:end
|
||||
AltText1: A map showing the Upper West side in New York City.
|
||||
:end
|
||||
|
||||
Step2Text: #### Step 2
|
||||
|
||||
Lorem Ipsum
|
||||
:end
|
||||
AltText2: The same map now highlights 98th Street.
|
||||
:end
|
||||
|
||||
Step3Text: #### Step 3
|
||||
|
||||
Lorem Ipsum
|
||||
:end
|
||||
AltText3: The same map now highlights three locations near 98th Street where something particulary important happened.
|
||||
|
||||
:end
|
||||
```
|
||||
|
||||
```svelte
|
||||
|
|
|
|||
|
|
@ -37,12 +37,16 @@ StackBackground: true
|
|||
:end
|
||||
AltText: A map showing the Upper West side in New York City.
|
||||
|
||||
Can add paragraphs of alt text if you want to break up sentences.
|
||||
:end
|
||||
|
||||
Background: AiMap2
|
||||
Text: #### Step 2
|
||||
|
||||
Lorem ipsum
|
||||
:end
|
||||
AltText: The same map now highlights 98th Street.
|
||||
:end
|
||||
|
||||
Background: AiMap3
|
||||
Text: #### Step 3
|
||||
|
|
@ -50,7 +54,7 @@ StackBackground: true
|
|||
Lorem ipsum
|
||||
:end
|
||||
AltText: The same map now highlights three locations near 98th Street where something particulary important happened.
|
||||
|
||||
:end
|
||||
[]
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue