Skip to content

Media: Update caption ID tests for unique IDs#1

Open
jamesbregenzer wants to merge 1 commit into
SteelWagstaff:fix/avoid-duplicate-ids-media-captionfrom
jamesbregenzer:ticket-65315
Open

Media: Update caption ID tests for unique IDs#1
jamesbregenzer wants to merge 1 commit into
SteelWagstaff:fix/avoid-duplicate-ids-media-captionfrom
jamesbregenzer:ticket-65315

Conversation

@jamesbregenzer
Copy link
Copy Markdown

Updates the caption shortcode tests to account for the unique ID generation introduced in this ticket.

The previous tests expected specific ID formats for caption elements. Since IDs are now generated dynamically to prevent duplicate IDs when multiple captions appear on a page, the tests have been updated to verify the presence of generated IDs and correct aria-describedby relationships rather than relying on exact ID values.

Trac ticket: https://core.trac.wordpress.org/ticket/65315

Use of AI Tools

AI assistance: Yes

Tool(s): ChatGPT

Model(s): GPT-5.5

Used for: Understanding the existing test failures, identifying why the assertions no longer matched the updated implementation, and suggesting revised test assertions. All code changes were reviewed, tested locally, committed, and submitted by me.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants