<astl-word-bank>
The words that gaps in the text take (<astl-drop bank>), distractors included. Ungraded: no slots, locked with the exercise; a bank alone is "no interactions". The view shows the words in a keyed order that is never the source order (authors often write them in the order of the gaps). Without reuse, a word fills one gap at a time: placing it again moves it. Several banks may share a document; each gap takes words from its own.
Generated from packages/components/src/word-bank/: the manifest, the message catalogs, the editor descriptor and the fixtures.
| Property | Value |
|---|---|
| Tag | <astl-word-bank> |
| Display | block: stands between paragraphs |
| Graded | no: nothing to answer |
| Slot kinds | none (what they mean) |
Element version (v) |
1 |
| Message namespace | astl.word-bank |
| Editor label | Word bank |
Live example
Section titled “Live example”The fixture word-bank-formatting, played with the English UI and graded in the browser. Try it, then press "Check".
Parts of speech
Read each sentence first. Then fill the gaps.
- A
names a person, a place or a thing. - A
shows an action, like runor swim.
In Polish, a noun is a.
<astl-doc lang="en"> <h3>Parts of <em>speech</em></h3> <p><strong>Read each sentence first.</strong> Then fill the gaps.</p> <ul> <li>A <astl-drop id="noun" bank="parts" answer="noun"></astl-drop> names a person, a place or a <em>thing</em>.</li> <li>A <astl-drop id="verb" bank="parts" answer="verb"></astl-drop> shows an action, like <code>run</code> or <i>swim</i>.</li> </ul> <blockquote>In Polish, a noun is a <span lang="pl"><astl-drop id="pl" bank="parts" answer="rzeczownik"></astl-drop></span>.</blockquote> <astl-word-bank id="parts"> <astl-word id="noun"><strong>noun</strong></astl-word> <astl-word id="verb"><em>verb</em></astl-word> <astl-word id="rzeczownik"><span lang="pl">rzeczownik</span></astl-word> <astl-word id="adjective" distractor>adjec<u>tive</u></astl-word> </astl-word-bank></astl-doc>Attributes
Section titled “Attributes”Visibility: public attributes stay in the view, private ones exist only in the answer key (students never get them), derived ones are written by the compiler.
| Attribute | Meaning |
|---|---|
idpublic, required id |
Source id, unique in the document. Views carry an opaque id instead. Common to all components. |
vpublic integer: >= 1 |
Element format version. Optional in sources (absent = 1); the compiler always writes the current one. Common to all components. |
style-templatepublic string |
A look by name, from the style templates the host registers (the component scope); it wins over the document's. More: Looks. Common to all components. |
reusepublic boolean default false |
One word can fill several gaps. Inspector: "One word for several gaps". |
Children
Section titled “Children”| Child | Meaning |
|---|---|
<astl-word>public, inline content 1 to 30 per element |
One word: id is local to the bank (gaps name it), distractor (private) tags a word no gap expects, for authors only. At most 30, so the bank stays easy to scan.Attributes: id (id, public, required), distractor (boolean, private). |
Variants
Section titled “Variants”One presentation: this component has no variants.
Scoring
Section titled “Scoring”Not graded: no slots and no scoring.
Issue codes
Section titled “Issue codes”Reported in the namespace astl.word-bank, on top of the document issues. Errors block compiling; warnings do not.
| Code | Messages |
|---|---|
WORD_BANK_WORD_EMPTYerror params id, word |
English: Word bank {id}: word {word} is empty. Polish: Bank słów {id}: słowo {word} jest puste. |
WORD_BANK_WORD_DUPLICATEerror params id, text |
English: Word bank {id}: two words say “{text}”, so students cannot tell them apart. To let one word fill several gaps, turn on reuse instead. Polish: Bank słów {id}: dwa słowa brzmią „{text}”, więc uczniowie ich nie odróżnią. Jeśli jedno słowo ma wypełniać kilka luk, włącz ponowne użycie słów. |
WORD_BANK_WORD_LINKerror params id, word |
English: Word bank {id}: the word “{word}” contains a link. Words are buttons, so a link inside one cannot work. Remove the link. Polish: Bank słów {id}: słowo „{word}” zawiera link. Słowa są przyciskami, więc link w słowie nie zadziała. Usuń link. |
Starters
Section titled “Starters”The insert menu lists <astl-word-bank> under "Components", where it inserts the default template, and its named starters under "Exercises": whole exercises with sample text in the author's language.
| Entry | English | Polish |
|---|---|---|
| Components | Word bank Words the student puts into the gaps of the text. |
Bank słów Słowa, które uczeń wstawia do luk w tekście. |
Exercises: drag-words |
Drag words into gaps A sentence with two gaps and a bank of three words, one of them extra. |
Przeciągnij słowa do luk Zdanie z dwiema lukami i bankiem trzech słów, z których jedno jest zbędne. |
Templates of astl-word-bank
As the descriptor writes them: {{id}} becomes a fresh id, {{t:key}} a message in the author's locale.
Default template:
<astl-word-bank id="{{id}}"><astl-word id="a">{{t:template.word1}}</astl-word><astl-word id="b">{{t:template.word2}}</astl-word><astl-word id="c" distractor>{{t:template.word3}}</astl-word></astl-word-bank>Named starter drag-words:
<h3>{{t:template.dragWords.heading}}</h3><p>{{t:template.dragWords.instruction}}</p><astl-word-bank id="{{id}}"><astl-word id="a">{{t:template.dragWords.answer1}}</astl-word><astl-word id="b">{{t:template.dragWords.answer2}}</astl-word><astl-word id="c" distractor>{{t:template.dragWords.distractor}}</astl-word></astl-word-bank><p>{{t:template.dragWords.start}} <astl-drop answer="a"></astl-drop>{{t:template.dragWords.middle}} <astl-drop answer="b"></astl-drop>{{t:template.dragWords.end}}</p>Accessibility
Section titled “Accessibility”- Pattern: group of toggle buttons with pick and place: Space or Enter picks a word; then Tab to a gap and press Enter, or choose a gap with the arrow keys and press Enter; Escape cancels; or drag the word onto a gap, or tap it and then the gap.
- Keys: Tab, Space, Enter, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, Escape.
What every element must keep: Accessibility.
CSS parts: word-bank, label, hint, word. How to reach them: Looks.
Authors pick a look for one element with style-template; it wins over the document's. Built-in templates for <astl-word-bank>: playful, notebook.
Editor
Section titled “Editor”| Property | Value |
|---|---|
| Label | Word bank (editor.label) |
| Description | Words the student puts into the gaps of the text. (editor.description) |
| Icon | cards |
| Id prefix | bank: new elements get bank-1, bank-2, ... |
Inspector fields, in order:
| Field | Edits | Label | Help |
|---|---|---|---|
child-flag |
distractor on each <astl-word> |
Distractors | Words no gap expects. Students see them like the others. |
attribute |
attribute reuse |
One word for several gaps | Without it, a word fills one gap at a time. |
All messages
Section titled “All messages”Every key of astl.word-bank: ui.* for students (messages/ui/<locale>.json, the only strings the element loads), issue codes, editor.* and template.* for authors (messages/<locale>.json).
40 keys in English and Polish
| Key | Messages |
|---|---|
ui.label |
English: Word bank Polish: Bank słów |
ui.hint |
English: Pick a word, then the gap it goes in. Polish: Wybierz słowo, a potem lukę, do której pasuje. |
ui.hintPicked |
English: Now pick the gap for “{word}”. Polish: Teraz wybierz lukę dla słowa „{word}”. |
ui.hintWaiting |
English: Now pick the word for gap {n}. Polish: Teraz wybierz słowo do luki {n}. |
ui.placed |
English: in gap {n} Polish: w luce {n} |
ui.announce.pick |
English: Picked “{word}”. Choose its gap with the arrow keys and press Enter, or go to the gap and press Enter. Polish: Wybrano „{word}”. Wybierz lukę strzałkami i naciśnij Enter albo przejdź do luki i naciśnij Enter. |
ui.announce.wait |
English: Gap {n}: choose a word with the arrow keys and press Enter. Polish: Luka {n}: wybierz słowo strzałkami i naciśnij Enter. |
ui.announce.out |
English: Took “{word}” out of gap {n}. Pick another gap for it, or press Escape. Polish: Wyjęto „{word}” z luki {n}. Wybierz dla tego słowa inną lukę albo naciśnij Escape. |
ui.announce.bank |
English: Word bank Polish: Bank słów |
ui.announce.gap |
English: Gap {n}: “{word}” Polish: Luka {n}: „{word}” |
ui.announce.gapEmpty |
English: Gap {n}, empty Polish: Luka {n}, pusta |
ui.announce.word |
English: “{word}” Polish: „{word}” |
ui.announce.wordPlaced |
English: “{word}”, in gap {n} Polish: „{word}”, w luce {n} |
ui.announce.put |
English: “{word}” is in gap {n}. Polish: „{word}” jest w luce {n}. |
ui.announce.back |
English: “{word}” is back in the word bank. Polish: Słowo „{word}” wróciło do banku słów. |
ui.announce.stay |
English: “{word}” stays in the word bank. Polish: „{word}” zostaje w banku słów. |
ui.announce.stayGap |
English: “{word}” stays in gap {n}. Polish: „{word}” zostaje w luce {n}. |
ui.announce.stayEmpty |
English: Gap {n} stays empty. Polish: Luka {n} zostaje pusta. |
WORD_BANK_WORD_EMPTY |
English: Word bank {id}: word {word} is empty. Polish: Bank słów {id}: słowo {word} jest puste. |
WORD_BANK_WORD_DUPLICATE |
English: Word bank {id}: two words say “{text}”, so students cannot tell them apart. To let one word fill several gaps, turn on reuse instead. Polish: Bank słów {id}: dwa słowa brzmią „{text}”, więc uczniowie ich nie odróżnią. Jeśli jedno słowo ma wypełniać kilka luk, włącz ponowne użycie słów. |
WORD_BANK_WORD_LINK |
English: Word bank {id}: the word “{word}” contains a link. Words are buttons, so a link inside one cannot work. Remove the link. Polish: Bank słów {id}: słowo „{word}” zawiera link. Słowa są przyciskami, więc link w słowie nie zadziała. Usuń link. |
editor.label |
English: Word bank Polish: Bank słów |
editor.description |
English: Words the student puts into the gaps of the text. Polish: Słowa, które uczeń wstawia do luk w tekście. |
editor.distractors |
English: Distractors Polish: Dystraktory |
editor.distractorsHelp |
English: Words no gap expects. Students see them like the others. Polish: Słowa, których nie oczekuje żadna luka. Uczniowie widzą je tak jak pozostałe. |
editor.reuse |
English: One word for several gaps Polish: Jedno słowo do kilku luk |
editor.reuseHelp |
English: Without it, a word fills one gap at a time. Polish: Bez tego słowo wypełnia naraz tylko jedną lukę. |
template.word1 |
English: first word Polish: pierwsze słowo |
template.word2 |
English: second word Polish: drugie słowo |
template.word3 |
English: extra word Polish: dodatkowe słowo |
editor.template.dragWords |
English: Drag words into gaps Polish: Przeciągnij słowa do luk |
editor.template.dragWords.description |
English: A sentence with two gaps and a bank of three words, one of them extra. Polish: Zdanie z dwiema lukami i bankiem trzech słów, z których jedno jest zbędne. |
template.dragWords.heading |
English: The Sun and the Moon Polish: Słońce i Księżyc |
template.dragWords.instruction |
English: Put the right word in each gap. One word is extra. Polish: Wstaw w każdą lukę właściwe słowo. Jedno słowo jest zbędne. |
template.dragWords.answer1 |
English: star Polish: gwiazda |
template.dragWords.answer2 |
English: Earth Polish: Ziemi |
template.dragWords.distractor |
English: planet Polish: planeta |
template.dragWords.start |
English: The Sun is a Polish: Słońce to |
template.dragWords.middle |
English: , and the Moon goes round the Polish: , a Księżyc krąży wokół |
template.dragWords.end |
English: . Polish: . |