Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility #2566

Merged
merged 49 commits into from Apr 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5761e99
first semi working alt f9 functionality
JohnMcLear Mar 25, 2015
b72127c
different font families for people with dyslexia
JohnMcLear Mar 25, 2015
be73e72
remove console log
JohnMcLear Mar 25, 2015
c6cac53
remove console log
JohnMcLear Mar 25, 2015
0c902ce
better logic for handling lr arrows
JohnMcLear Mar 25, 2015
bc760e9
logic to send focus back to pad on Alt F9 when focus on editbar
JohnMcLear Mar 25, 2015
e9360b6
working f9 logic
JohnMcLear Mar 25, 2015
aff802a
whoops
JohnMcLear Mar 25, 2015
e67ae52
support drop down show events
JohnMcLear Mar 25, 2015
69f0392
escape to exit editbar
JohnMcLear Mar 26, 2015
4362a42
make index page accessible for screen readers
JohnMcLear Mar 26, 2015
ec1956b
read for button activity
JohnMcLear Mar 26, 2015
1a5ea87
make the pad contents act like an application and not contents, this …
JohnMcLear Mar 26, 2015
959aa92
stop listing URL each time focus is placed back on inner iframe
JohnMcLear Mar 26, 2015
7b726cb
more working logic and also pretty nice screen reader experience
JohnMcLear Mar 26, 2015
6b88c03
fix firefox button styling
JohnMcLear Mar 26, 2015
548cef7
more keyboard support while in editbar
JohnMcLear Mar 26, 2015
428b547
alt c to focus on chat and gritter and chat both now work with aria
JohnMcLear Mar 26, 2015
19e83d5
much better chat focus toggle behavior
JohnMcLear Mar 26, 2015
f9071ae
fix issue with showControls false not working
JohnMcLear Mar 30, 2015
a82e692
dont use nasty settimeouts use a callback instead for focus
JohnMcLear Mar 31, 2015
3594898
make Alt C and Alt F9 and Escape work from anywhere
JohnMcLear Mar 31, 2015
ef38bca
make buttons i18n friendly and a better experience
JohnMcLear Mar 31, 2015
3126d71
fix alt and focus issues
JohnMcLear Mar 31, 2015
0f0a6c7
make user list a document so it's easy to navigate by screen readers
JohnMcLear Mar 31, 2015
73073dc
Timeslider accessibility and Bugfixes
JohnMcLear Mar 31, 2015
24e6e17
I came to bring the rain.. Let me get my coat... Fix focus on time…
JohnMcLear Mar 31, 2015
498e7f4
MVP of alt A behavior to show author of line
JohnMcLear Mar 31, 2015
662216b
slightly different alt stuff
JohnMcLear Mar 31, 2015
37c7c7e
i18n for timeslider steppers
JohnMcLear Mar 31, 2015
48862da
better handling for inputs and left and right arrows
JohnMcLear Mar 31, 2015
64034ee
doh caps
JohnMcLear Mar 31, 2015
e9d8c3b
expose method for getting a full user list on the client including hi…
JohnMcLear Mar 31, 2015
0b90da1
Merge branch 'develop' of github.com:ether/etherpad-lite into editbar…
JohnMcLear Mar 31, 2015
733deb6
fix font type test
JohnMcLear Mar 31, 2015
fef746e
fix import issue with txt files and abiword #2572
JohnMcLear Mar 31, 2015
f6b4b56
fix timeslider title issues
JohnMcLear Apr 1, 2015
ee5833b
Merge branch 'develop' of github.com:ether/etherpad-lite into editbar…
JohnMcLear Apr 1, 2015
85fc012
change to alt shit and a to show authors
JohnMcLear Apr 2, 2015
139edce
Merge branch 'editbar-accessibility' of github.com:ether/etherpad-lit…
JohnMcLear Apr 2, 2015
f79e2c7
final accessibility for Timeslider hopefully
JohnMcLear Apr 3, 2015
9090d76
temp solution for alt 9 to show editbar label
JohnMcLear Apr 3, 2015
c65ddad
title for chat
JohnMcLear Apr 3, 2015
db0bcdd
fix issue where focus on timeslider wouldnt work
JohnMcLear Apr 5, 2015
e49bb40
use ctrl shift 2 instead of alt a
JohnMcLear Apr 5, 2015
41bb4ef
support for open dyslexic font
JohnMcLear Apr 5, 2015
56ce8e8
hacky fix for opendyslexic
JohnMcLear Apr 5, 2015
e027083
timeslider settings for fonts
JohnMcLear Apr 5, 2015
7e99724
Merge branch 'develop' of github.com:ether/etherpad-lite into editbar…
JohnMcLear Apr 6, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/locales/en.json
Expand Up @@ -38,7 +38,24 @@
"pad.settings.rtlcheck": "Read content from right to left?",
"pad.settings.fontType": "Font type:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.opendyslexic": "Open Dyslexic",
"pad.settings.fontType.monospaced": "Monospace",
"pad.settings.fontType.comicsans": "Comic Sans",
"pad.settings.fontType.couriernew": "Courier New",
"pad.settings.fontType.georgia": "Georgia",
"pad.settings.fontType.impact": "Impact",
"pad.settings.fontType.lucida": "Lucida",
"pad.settings.fontType.lucidasans": "Lucida Sans",
"pad.settings.fontType.palatino": "Palatino",
"pad.settings.fontType.tahoma": "Tahoma",
"pad.settings.fontType.timesnewroman": "Times New Roman",
"pad.settings.fontType.trebuchet": "Trebuchet",
"pad.settings.fontType.verdana": "Verdana",
"pad.settings.fontType.symbol": "Symbol",
"pad.settings.fontType.webdings": "Webdings",
"pad.settings.fontType.wingdings": "Wingdings",
"pad.settings.fontType.sansserif": "Sans Serif",
"pad.settings.fontType.serif": "Serif",
"pad.settings.globalView": "Global View",
"pad.settings.language": "Language:",

Expand Down Expand Up @@ -105,6 +122,10 @@
"timeslider.version": "Version {{version}}",
"timeslider.saved": "Saved {{month}} {{day}}, {{year}}",

"timeslider.playPause": "Playback / Pause Pad Contents",
"timeslider.backRevision":"Go back a revision in this Pad",
"timeslider.forwardRevision":"Go forward a revision in this Pad",

"timeslider.dateformat": "{{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "January",
"timeslider.month.february": "February",
Expand Down
6 changes: 4 additions & 2 deletions src/node/handler/ImportHandler.js
Expand Up @@ -148,6 +148,9 @@ exports.doImport = function(req, res, padId)
if(!importHandledByPlugin || !directDatabaseAccess){
var fileEnding = path.extname(srcFile).toLowerCase();
var fileIsHTML = (fileEnding === ".html" || fileEnding === ".htm");
var fileIsTXT = (fileEnding === ".txt");
if (fileIsTXT) abiword = false; // Don't use abiword for text files
// See https://github.com/ether/etherpad-lite/issues/2572
if (abiword && !fileIsHTML) {
abiword.convertFile(srcFile, destFile, "htm", function(err) {
//catch convert errors
Expand Down Expand Up @@ -213,7 +216,7 @@ exports.doImport = function(req, res, padId)
// Title needs to be stripped out else it appends it to the pad..
text = text.replace("<title>", "<!-- <title>");
text = text.replace("</title>","</title>-->");

//node on windows has a delay on releasing of the file lock.
//We add a 100ms delay to work around this
if(os.type().indexOf("Windows") > -1){
Expand Down Expand Up @@ -245,7 +248,6 @@ exports.doImport = function(req, res, padId)
padManager.getPad(padId, function(err, _pad){
var pad = _pad;
padManager.unloadPad(padId);

// direct Database Access means a pad user should perform a switchToPad
// and not attempt to recieve updated pad data..
if(!directDatabaseAccess){
Expand Down
2 changes: 1 addition & 1 deletion src/node/utils/Settings.js
Expand Up @@ -95,7 +95,7 @@ exports.toolbar = {
["showusers"]
],
timeslider: [
["timeslider_export", "timeslider_returnToPad"]
["timeslider_export", "timeslider_settings", "timeslider_returnToPad"]
]
}

Expand Down
10 changes: 9 additions & 1 deletion src/node/utils/toolbar.js
Expand Up @@ -99,12 +99,14 @@ _.extend(Button.prototype, {
};
return tag("li", liAttributes,
tag("a", { "class": this.grouping, "data-l10n-id": this.attributes.localizationId },
tag("span", { "class": " "+ this.attributes.class })
tag("button", { "class": " "+ this.attributes.class, "data-l10n-id": this.attributes.localizationId })
)
);
}
});



SelectButton = function (attributes) {
this.attributes = attributes;
this.options = [];
Expand Down Expand Up @@ -208,6 +210,12 @@ module.exports = {
class: "buttonicon buttonicon-import_export"
},

timeslider_settings: {
command: "settings",
localizationId: "pad.toolbar.settings.title",
class: "buttonicon buttonicon-settings"
},

timeslider_returnToPad: {
command: "timeslider_returnToPad",
localizationId: "timeslider.toolbar.returnbutton",
Expand Down
49 changes: 43 additions & 6 deletions src/static/css/pad.css
Expand Up @@ -70,10 +70,6 @@ a img {
.toolbar ul li {
float: left;
margin-left: 2px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
height:32px;
}
.toolbar ul li.separator {
Expand Down Expand Up @@ -141,9 +137,24 @@ a img {
top: 1px;
}
.toolbar ul li a .buttontext {
color: #222;
color: #666;
font-size: 14px;
border:none;
background:none;
margin-top:1px;
color:#666;
}

.buttontext::-moz-focus-inner {
padding: 0;
border: 0;
}

.buttontext:focus{
/* Not sure why important is required here but it is */
border: 1px solid #666 !important;
}

.toolbar ul li a.grouped-left {
border-radius: 3px 0 0 3px;
}
Expand Down Expand Up @@ -197,6 +208,7 @@ li[data-key=showusers] > a #online_count {
#editbar{
display:none;
}

#editorcontainer {
position: absolute;
top: 37px; /* + 1px border */
Expand Down Expand Up @@ -742,12 +754,24 @@ table#otheruserstable {
height: 16px;
display: inline-block;
vertical-align: middle;

border: none;
padding: 0;
background: none;
font-family: "fontawesome-etherpad";
font-size: 15px;
font-style: normal;
font-weight: normal;
color: #666;
cursor: pointer;
}

.buttonicon::-moz-focus-inner {
padding: 0;
border: 0
}

.buttonicon:focus{
border: 1px solid #666;
}
.buttonicon-bold:before {
content: "\e81c";
Expand Down Expand Up @@ -1216,6 +1240,11 @@ input[type=checkbox] {
}
/* End of gritter stuff */

@font-face {
font-family: opendyslexic;
src: url("../../static/font/opendyslexic.otf") format("opentype");
}

@font-face {
font-family: "fontawesome-etherpad";
src:url("../font/fontawesome-etherpad.eot");
Expand Down Expand Up @@ -1254,3 +1283,11 @@ input[type=checkbox] {
-moz-osx-font-smoothing: grayscale;
}

.hideControlsEditor{
top:0px !important;
}
.hideControlsEditbar{
display:none !important;
}


32 changes: 22 additions & 10 deletions src/static/css/timeslider.css
Expand Up @@ -78,6 +78,7 @@
width: 44px;
text-align:center;
vertical-align:middle;
background:none;
}
#playpause_button {
right: 77px;
Expand Down Expand Up @@ -125,7 +126,7 @@
font-family: fontawesome-etherpad;
border-radius:2px;
border: #666 solid 1px;
line-height:18px;
/* line-height:18px; */
text-align:center;
height:22px;
color:#666;
Expand Down Expand Up @@ -204,12 +205,9 @@ stepper:active{
float:right;
height:30px;
}
#settings,
#import_export,
#embed,
#connectivity,
#users {
top: 62px;
#import_export, #settings{
top: 115px;
position: fixed;
}
#import_export .popup {
width: 183px;
Expand All @@ -218,9 +216,7 @@ stepper:active{
border-radius: 0 0 0 6px;
}
#import_export {
top: 115px;
width: 185px;
position: fixed;
}
.timeslider-bar {
background: #f7f7f7;
Expand All @@ -236,7 +232,7 @@ stepper:active{
.timeslider-bar #editbar {
border-bottom: none;
float: right;
width: 170px;
width: 180px;
}
.timeslider-bar h1 {
margin: 5px
Expand Down Expand Up @@ -337,3 +333,19 @@ OL {
.list-number6 {
list-style-type: lower-roman
}

button{
margin:0;
padding:0;
cursor:pointer;
}

button::-moz-focus-inner {
padding: 0;
border: 0
}

button:focus{
border: 1px solid #666;
}

Binary file added src/static/font/opendyslexic.otf
Binary file not shown.
4 changes: 3 additions & 1 deletion src/static/js/ace.js
Expand Up @@ -265,7 +265,7 @@ plugins.ensure(function () {\n\
iframeHTML: iframeHTML
});

iframeHTML.push('</head><body id="innerdocbody" class="syntax" spellcheck="false">&nbsp;</body></html>');
iframeHTML.push('</head><body id="innerdocbody" role="application" class="syntax" spellcheck="false">&nbsp;</body></html>');

// Expose myself to global for my child frame.
var thisFunctionsName = "ChildAccessibleAce2Editor";
Expand All @@ -279,6 +279,7 @@ window.onload = function () {\n\
setTimeout(function () {\n\
var iframe = document.createElement("IFRAME");\n\
iframe.name = "ace_inner";\n\
iframe.title = "pad";\n\
iframe.scrolling = "no";\n\
var outerdocbody = document.getElementById("outerdocbody");\n\
iframe.frameBorder = 0;\n\
Expand Down Expand Up @@ -319,6 +320,7 @@ window.onload = function () {\n\
var outerFrame = document.createElement("IFRAME");
outerFrame.name = "ace_outer";
outerFrame.frameBorder = 0; // for IE
outerFrame.title = "Ether";
info.frame = outerFrame;
document.getElementById(containerId).appendChild(outerFrame);

Expand Down