w3c

Is there an online emulating screen reader tool to test against a custom web page? [closed]

我的梦境 提交于 2019-12-21 04:02:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . We are concerned about accessibility on our web site and would like to see how it is perceived and decoded by a common screen reader? 回答1: No. At least not one that is any good nor represents how a screen reader actually reads a page or responds to ARIA. The best answer is to test in real screen readers, ideally

Can a label only refer to input elements?

为君一笑 提交于 2019-12-21 03:40:53
问题 W3Schools have this to say about labels: The <label> tag defines a label for an input element. [Emphasis mine] Does this mean that the following HTML isn't valid? <!doctype html> <html> <head> <title>Example document</title> </head> <body> <label for="x">Label</label> <hr> <div id="q" contentEditable="true">Hello</div> <hr> <div id="x" contentEditable="true">World</div> </body> </html> Both Chrome and IE8 give focus to World when Label is clicked, Firefox does not. Which is correct? 回答1:

Why are preload link not working for JSON requests ?

喜你入骨 提交于 2019-12-20 12:15:14
问题 The JavaScript on my website loads several JSON to initialize itself. I would like to preload them so, when the JavaScript will launch an Ajax request on it, they will be loaded instantaneously. A new link tag exists for that. I tried to use it to load a JSON like that : <link rel="preload" href="/test.json"> However, Chrome seems to load it twice and present a warning in the console : The resources test.json was preloaded using link preload but not used within a few seconds from the window's

Correct way to include CSS after <head>

こ雲淡風輕ζ 提交于 2019-12-20 11:49:20
问题 Apparently adding <link rel="stylesheet" ... in the document body is considered a bad practice by W3C standards. The same for adding <style> blocks in the body... So are there any standard-compliant solutions to add CSS outside of the <head> tag? Like at the end of the document. 回答1: If you only want to include your CSS styles on a specific events, there's nothing stopping you from doing so at the head: var linkElement = document.createElement("link"); linkElement.rel = "stylesheet";

What is the difference between a W3C Working Draft and an Editor's Draft?

我只是一个虾纸丫 提交于 2019-12-20 10:37:02
问题 I'm reading XMLHttpRequest Level 2 specification (W3C Working Draft 07 September 2010) but after I noticed that browsers are implementing features described into a Editor's Draft that has eliminated many things. Which is the difference between a Working Draft and an Editor's Draft ? 回答1: A Working Draft is a document that has been officially published by the group that is developing it, which means that the members of that group have agreed that it is in a state worth sharing with a wider

Save XML format to a string instead of a file [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-12-20 03:55:38
问题 This question already has answers here : How to convert org.jdom.Document to String (2 answers) How do I convert a org.w3c.dom.Document object to a String? (4 answers) Closed 3 years ago . I used the DocumentBuilderFactory to create XML file as done here: How to create XML file with specific structure in Java. Instead of saving it to a file, I want to store the result as a java String. How to achieve that. Duplicate: How do I convert a org.w3c.dom.Document object to a String? 回答1: This

Is there a cross-browser method of getting the used css values of all properties of all elements?

梦想与她 提交于 2019-12-19 21:35:49
问题 I'm looking to get the used css values of all DOM elements on a page. When I say "used values" I'm referring to the definition as specified in the W3C specification: 6.1.3 Used values Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined until the width of

Converting DOMTimeStamp to localized HH:MM:SS MM-DD-YY via Javascript

こ雲淡風輕ζ 提交于 2019-12-19 19:52:13
问题 The W3C Geolocation API (among others) uses DOMTimeStamp for its time-of-fix. This is "milliseconds since the start of the Unix Epoch". What's the easiest way to convert this into a human readable format and adjust for the local timezone? 回答1: One version of the Date constructor takes the number of "milliseconds since the start of the Unix Epoch" as its first and only parameter. Assuming your timestamp is in a variable called domTimeStamp , the following code will convert this timestamp to

How can block container establish both block and inline formatting contexts at the same time?

萝らか妹 提交于 2019-12-19 19:40:21
问题 From the CSS Display Module Level 3 specs there is a note about block container that says: Note: A block container box can both establish a block formatting context and an inline formatting context simultaneously. How is this possible conceptually? And how are children boxes laid out then? For example, if we have both inline-level and block-level boxes inside block container, which formatting context is used in that case? Are both formatting contexts used at the same time or one of them "wins

Working example for MediaElementAudioSourceNode with Chrome Canary?

拟墨画扇 提交于 2019-12-19 10:48:14
问题 I'm experimenting with the W3C Web Audio API implemented and enabled in Google Chrome Canary builds. (i have 15.0.865.0 canary on Windows 7 x64 at the moment) Demo applications work just fine. I like to use MediaElementAudioSourceNode because i like to play a larger OGG music. For such audio files the API says that i should use this instead of AudioBufferSourceNode . I've written a very simple example: <script type="text/javascript"> var audioElement = document.createElement('audio');