Skip to content

Rename TreeItem's alt_text to description for consistency with Accessibility API - #107540

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
Mickeon:rename-TreeItem-accessibility-alt-text-to-description
Jun 14, 2025
Merged

Rename TreeItem's alt_text to description for consistency with Accessibility API#107540
akien-mga merged 1 commit into
godotengine:masterfrom
Mickeon:rename-TreeItem-accessibility-alt-text-to-description

Conversation

@Mickeon

@Mickeon Mickeon commented Jun 14, 2025

Copy link
Copy Markdown
Member

So, basically, #76829 introduced many accessibility methods and properties across many classes, in order to assign a custom summary for assistive applications. Most commonly, this is referred to as "description":

  • Control: accessibility_description
  • DisplayServer: accessibility_update_set_description & similar.
  • InputMap: get_action_description
  • Viewport: gui_get_drag_description & gui_set_drag_description

In comparison, TreeItem is the only one that refers to the same concept as "alternative text" 1:
set_alt_text, get_alt_text, set_button_alt_text. This is inconsistent, and this PR addresses that.

Note that this breaks compatibility, but only with existing dev versions, as #76829 was merged during 4.5's development.

Footnotes

  1. RichTextLabel actually has an alt_text parameter for images, which is entirely appropriate.

@Mickeon Mickeon added this to the 4.5 milestone Jun 14, 2025
@Mickeon
Mickeon requested a review from a team as a code owner June 14, 2025 16:41
@Mickeon
Mickeon requested a review from a team as a code owner June 14, 2025 16:41
@Mickeon
Mickeon requested a review from bruvzg June 14, 2025 16:45
@Mickeon
Mickeon force-pushed the rename-TreeItem-accessibility-alt-text-to-description branch from ae20c03 to adcfaf8 Compare June 14, 2025 17:11
@Mickeon
Mickeon force-pushed the rename-TreeItem-accessibility-alt-text-to-description branch from adcfaf8 to 76a7c31 Compare June 14, 2025 17:56
@akien-mga
akien-mga merged commit b2b449d into godotengine:master Jun 14, 2025
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@Mickeon
Mickeon deleted the rename-TreeItem-accessibility-alt-text-to-description branch June 14, 2025 22:56
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…cessibility-alt-text-to-description

Rename TreeItem's `alt_text` to `description` for consistency with Accessibility API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants