Implement all the ARIA keyboard interactions, and selection follows focus

This commit is contained in:
Eric Allam
2022-03-18 10:05:32 +00:00
parent 084a93e03a
commit f9671c6df7
15 changed files with 364 additions and 56 deletions
+6 -2
View File
@@ -31,15 +31,19 @@ export function formatValue(type: JSONValueType): string | undefined {
case "array": {
if (type.value.length == 0) {
return formatRawValue(type);
} else if (type.value.length === 1) {
return `1 item`;
} else {
return undefined;
return `${type.value.length} items`;
}
}
case "object": {
if (Object.keys(type.value).length == 0) {
return formatRawValue(type);
} else if (Object.keys(type.value).length === 1) {
return `1 field`;
} else {
return undefined;
return `${Object.keys(type.value).length} fields`;
}
}
case "bool": {