Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

PhantomJS does not adhere to the HTML spec wrt option's label attribute #11365

Closed
ashemedai opened this issue May 29, 2013 · 1 comment
Closed
Labels

Comments

@ashemedai
Copy link

(Mea culpa if this needs to be filed under Ghost Driver, I tried getting a JavaScript test case working to verify on what side of the divide the problem lies, but I was a bit out of my depth.)

Using PhantomJS through Python Selenium bindings I encountered that trying to get the label attribute of an option element yields an empty string with PhantomJS when the attribute has not been explicitly specified in the HTML. Chrome and Firefox work as expected.

I.e. <option>Blah</option> should yield Blah, whereas <option label="Test">Blah</option> should yield Test if asked, in both cases, for the label attribute of <option>.

HTML 4.01 specification section on option:

When rendering a menu choice, user agents should use the value of the label attribute of the OPTION element as the choice. If this attribute is not specified, user agents should use the contents of the OPTION element.

HTML 5 specification section on option:

The label attribute provides a label for element. The label of an option element is the value of the label content attribute, if there is one, or, if there is not, the value of the element's text IDL attribute.

@stale stale bot added the stale label Dec 27, 2019
@stale
Copy link

stale bot commented Dec 30, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant