Cherry-pick the good stuff from input-per-letter
This commit is contained in:
parent
687f2acc22
commit
a688c30427
|
@ -73,7 +73,9 @@ function Game(props: GameProps) {
|
|||
setGuesses((guesses) => guesses.concat([currentGuess]));
|
||||
setCurrentGuess((guess) => "");
|
||||
if (currentGuess === target) {
|
||||
setHint("You won! (Enter to play again)");
|
||||
setHint(
|
||||
`You won! The answer was ${target.toUpperCase()}. (Enter to play again)`
|
||||
);
|
||||
setGameState(GameState.Won);
|
||||
} else if (guesses.length + 1 === props.maxGuesses) {
|
||||
setHint(
|
||||
|
@ -170,7 +172,9 @@ function Game(props: GameProps) {
|
|||
Give up
|
||||
</button>
|
||||
</div>
|
||||
<table className="Game-rows">{tableRows}</table>
|
||||
<table className="Game-rows" tabIndex={0}>
|
||||
<tbody>{tableRows}</tbody>
|
||||
</table>
|
||||
<p role="alert">{hint || `\u00a0`}</p>
|
||||
{/* <p role="alert" className="Game-sr-feedback">
|
||||
{srStatus}
|
||||
|
|
|
@ -27,7 +27,7 @@ export function Row(props: RowProps) {
|
|||
<td
|
||||
key={i}
|
||||
className={letterClass}
|
||||
aria-live="polite"
|
||||
aria-live={isEditing ? "assertive" : "off"}
|
||||
aria-label={
|
||||
isLockedIn
|
||||
? letter.toUpperCase() +
|
||||
|
|
|
@ -44,7 +44,7 @@ export function clueWord(clue: Clue): string {
|
|||
if (clue === Clue.Absent) {
|
||||
return "no";
|
||||
} else if (clue === Clue.Elsewhere) {
|
||||
return "yellow";
|
||||
return "elsewhere";
|
||||
} else {
|
||||
return "correct";
|
||||
}
|
||||
|
|
|
@ -3743,7 +3743,6 @@
|
|||
"neighborhood",
|
||||
"fragments",
|
||||
"symbolic",
|
||||
"wales",
|
||||
"designated",
|
||||
"prescribed",
|
||||
"electricity",
|
||||
|
|
Loading…
Reference in a new issue