Skip to content

Script pane: a layer's suggestion row keeps an old count of features for a screen reader while its list is open #2697

Closed

Description

@jgregoriorincon

What happens

#2619 (PR #2654) gave each suggestion-list row a description for a screen reader, worked out once per row per list and kept while the list's offer is the same. In the Script pane, a layer's row says its count of features (Point · 243 features · 6 fields, from item_help). When that count changes while the layer list stays open, the offer is still equal (same layer names), so the row keeps the description it had: a reader hears the old count, while the help card beside the list shows the new one.

The count changes with the list open in two ways:

  • a command run meanwhile (an edit, a delete, a script step);
  • a streamed layer's read as the map is drawn (sync_sources_with), which changes the layer's features without a command, so not even the session's revision moves.

Steps

  1. Script pane, type labels.style {"layer": "Citi (the layer list opens on Cities).
  2. Delete some cities (select by attributes, then Delete), keeping the list open.
  3. With a screen reader on, the Cities row still says the old count.

Checked on the merged code (d17f023) with a test: after the delete, the highlighted row's description still says 243 features.

Proposed fix

The rows' descriptions are kept by a key of what they're read from, given by the caller, not by the offer alone: in the Script pane, the session's revision and, for a list of layers, each layer's count of features. A regression test deletes cities by commands, then drops a feature as a streamed read does, with the list open, and checks the row's description each time.

The user guide also doesn't say that Page Up / Page Down scroll a list's help, or that a screen reader reads the highlighted entry (#2619): docs/user-guide/expressions.md and the Script pane section of docs/user-guide/analysis.md.

Activity

  1. jgregoriorincon commented on Nov 22, 2026

    @jgregoriorincon
    ContributorAuthor

    I'd like to take this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions