这是indexloc提供的服务,不要输入任何密码
Skip to content

Node re-visiting in AccName #72

@OisinNolan

Description

@OisinNolan

Problem

  • AccName fails a small set of WPTs of the form seen in http://wpt.live/accname/name_test_case_659-manual.html.
  • If AccName were to pass these tests, its WPT performance should be 100%.
  • I think the problem here is that accname is visiting the same target <input /> Node twice here, adding it to the list of context.visitedNodes only when it traverses this <input /> for the second time.
  • The spec is in large part responsible for this issue, specifying only in step 2F that Each node in the subtree is consulted only once.. In fact it would appear that no node should ever be visited more than once during accessible name computation, in which case the spec should be re-worded to reflect this.

A Potential Solution

  • This could be implemented by keeping track of any node that is passed to computeTextAlternative() and ensuring that a node is only processed if it has never been seen before.
  • This would probably also be a good opportunity to merge context.inherited.visitedNodes and context.inherited.nodesUsed.

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