mirror of
https://github.com/google/blockly.git
synced 2026-06-02 17:30:07 +02:00
fix: Fix bug that caused an incorrect count of inputs on blocks when generating ARIA labels (#9927)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user