w3c / w3c/webdriver

Allow accessing text in a shadow tree

Open
#1,350 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

Right now Get Element Text will return the empty string if the text is contained in a shadow tree unless it happens to come from a slot defined in the shadow host. Because the js atoms for Get Element Text are running in content js they can't access closed shadow trees, so fixing this may require users to opt in to some other Get Element Text implementation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Get Element Text command and the JavaScript atoms running in content JS; the issue identifies closed shadow trees as the access constraint. Determine whether an opt-in implementation is needed, and define coverage for text in shadow trees, including slotted content. Done means Get Element Text can return the relevant shadow-tree text without violating closed-tree access rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.