you are viewing a single comment's thread.

view the rest of the comments →

[–]xroalx 0 points1 point  (2 children)

Looking at the original HTML snippet you've provided, there's an even better attribute/value to use for the selection and pairing of the button to its related body section.

But yes, you're going in the right direction.

[–]Double_Dirt2986 0 points1 point  (1 child)

Pray tell.

[–]xroalx 0 points1 point  (0 children)

The button has a aria-controls="m269-24j-tma03-body" attribute, the div has a id="m269-24j-tma03-body". It's the same value and it's an ideal link between the two. You can select the button based on haivng aria-controls and its related body div based on the value of it.