Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
Merge pull request #55 from menovak/master
Browse files Browse the repository at this point in the history
Further #32 enhancements; Validation service (fixes #44)
  • Loading branch information
matatk committed Dec 29, 2014
2 parents 01d57f9 + 2efbc5a commit 7fb86e3
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 16 deletions.
16 changes: 5 additions & 11 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,16 @@ in the HTML code of the web page. It is a high level indication of the
code quality, and does not provide any details about the nature of the
errors.

### W3C Nu validation service
### W3C Nu Markup Checker

The W3C Nu validation service provides a detailed report on the HTML and
ARIA code of the web page, including errors and warnings. There are
options to open the report in the current window or a new window.

### W3C Nu validation service (as HTML5)

The W3C Nu validation service provides a detailed report on the HTML and
The W3C Nu Markup Checker provides a detailed report on the HTML and
ARIA code of the web page, including errors and warnings. There are
options to open the report in the current window or a new window.

### Filter Nu results

The Nu filter can be used on the results produced by the W3C Nu
validation service. It filters the results so that only conformance
Markup Checker. It filters the results so that only conformance
issues relating to accessibility are displayed.

### W3C HTML validation service
Expand Down Expand Up @@ -163,7 +157,7 @@ image.

Checks for the presence of client-side and server-side image maps. if
none are found it is indicated by an alert message. If image maps are
found, they are displayed in a new window along withthe associated area
found, they are displayed in a new window along with the associated area
elements

### Active images
Expand Down Expand Up @@ -401,7 +395,7 @@ leading to downloadable files on the current page.

### View partial source

Displays the DOM tree of the selected content as HTML. Select aome page
Displays the DOM tree of the selected content as HTML. Select some page
content then activate the function. A new window will open showing the
selected content and generated code.

Expand Down
2 changes: 0 additions & 2 deletions wat/Accessibility_Toolbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
<separator/>
<item resid="validatorNU" image="-1" />
<item resid="validatorNU_m" image="-1" window="new" />
<item resid="Validate_HTML_5" image="-1" />
<item resid="Validate_HTML_5_m" image="-1" window="new" />
<item resid="wcag_filter" image="-1" />
<separator/>
<subitem resid="W3C_HTML_Validator">
Expand Down
Binary file modified wat/Translation.ini
Binary file not shown.
44 changes: 41 additions & 3 deletions wat/scripts/partial-source.ws
Original file line number Diff line number Diff line change
@@ -1,11 +1,49 @@
function main()
// borrowed getSelectionHtml() from web @ http://stackoverflow.com/questions/5222814/window-getselection-return-html
function getSelectionHtml() {
var html = "";
if (typeof window.getSelection != "undefined") {
var sel = window.getSelection();
if (sel.rangeCount) {
var container = document.createElement("div");
for (var i = 0, len = sel.rangeCount; i < len; ++i) {
container.appendChild(sel.getRangeAt(i).cloneContents());
}
html = container.innerHTML;
}
} else if (typeof document.selection != "undefined") {
if (document.selection.type == "Text") {
html = document.selection.createRange().htmlText;
}
}
return html;
}

function main()
{
try
{
q=(f_length?'':document.selection.createRange().htmlText);
if (window.getSelection())
q=(f_length?'':getSelectionHtml()); // could just do same thing as below with the GetFrames, instead of calling the function
else
q=(f_length?'':document.selection.createRange().htmlText);

for(i=0;i<f_length;i++)
{
q=GetFrame(i).document.selection.createRange().htmlText;
if (window.getSelection())
{
var a = GetFrame(i).getSelection();
if (a.rangeCount)
{
var container = document.createElement("div");
for (var i = 0, len = a.rangeCount; i < len; ++i)
{
container.appendChild(a.getRangeAt(i).cloneContents());
}
q = container.innerHTML;
}
}
else
q=GetFrame(i).document.selection.createRange().htmlText;
//alert(q);
if(q!='')break;
}
Expand Down

0 comments on commit 7fb86e3

Please sign in to comment.