fix: Fix bug that caused an incorrect count of inputs on blocks when generating ARIA labels (#9927)

This commit is contained in:
Aaron Dodson
2026-05-22 14:23:51 -07:00
committed by GitHub
parent 2d9f4023d7
commit 40a584163b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -627,7 +627,7 @@ function getInputCountLabel(block: BlockSvg) {
return (
input.fieldRow.reduce((fieldCount, field) => {
return field.EDITABLE && !field.isFullBlockField()
? fieldCount++
? ++fieldCount
: fieldCount;
}, totalSum) +
(input.connection?.type === ConnectionType.INPUT_VALUE ? 1 : 0)
+1 -1
View File
@@ -496,7 +496,7 @@ suite('ARIA', function () {
});
test('Blocks without inputs are properly labeled', function () {
const block = this.makeBlock('logic_boolean');
const block = this.makeBlock('logic_null');
const label = Blockly.utils.aria.getState(
block.getFocusableElement(),
Blockly.utils.aria.State.LABEL,