Skip to content

coalesce adjacent label fields #9855

@maribethb

Description

@maribethb

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

No response

Request

some blocks visually have adjacent labels that are actually part of different inputs. e.g. first part of the string belongs to a dummy input and the second part belongs to a value input. this is due to various reasons with block design.

currently, all fields have their screenreader output separate by commas. but if two label fields are visually adjacent then there are extra commas.

we want to remove the extra commas between adjacent label fields (in other words, coalesce adjacent label fields into one "piece" of the screenreader output)

for the purpose of this issue a label field is any subclass of FieldLabel and "adjacent" means in subsequent field position on the block but respecting "rows" (e.g. a label field at the end of an end-row input is not adjacent to a label field in a statement input on the following row)

Example block definition:

Blockly.Blocks['device_show_number'] = {
  init: function () {
    this.appendDummyInput()
      .appendField('show');

    this.appendValueInput('number')
      .setCheck('Number')
      .appendField('number');

    this.setPreviousStatement(true);
    this.setNextStatement(true);

    this.setColour('#1e90ff');
  }
};

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

issue: feature requestDescribes a new feature and why it should be added

Type

No type
No fields configured for issues without a type.

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions