i was just looking though some css code on todomvc and i wanted to know how they did their destroy button. I found an X symbol.
i'm relative new to programming and i'm curious what is that? how do you make something like that?
and here is a screenshot:
click to enlarge
Hit Windows Key + R, type charmap and hit Run.
You can now happily explore all of the characters in all of the fonts on your system, choose one, then copy-paste it to your code.
However, I would advise against just blindly copying. I'm a single-byte-character-set-nerd, so I would prefer to use \2716 instead of directly pasting ✖ into my CSS file. You can find the code by clicking the desired character and looking for the U+#### in the status bar.
This is simply a Unicode character that you can type (or paste) into text just like any other. As long as the browser knows how to interpret the CSS file encoding (which it does) and the character is acceptable as part of the input (which it is for CSS) then it is no different to use than any plain English letter.
We can't tell which one exactly from the screenshot, but you can see some likely options in Wikipedia.
They did it using generated content in CSS, which means that when CSS is disabled, the symbol does not appear there at all. In the CSS rule for generated content, the symbol has been inserted as such, which looks odd, since it should be in quotes, but you are actually showing us just a look at the document via developer tools in some browser, and such tools are known to simplify and modify things. It is not possible to deduce from the given data how they entered the character.
Independently of the way in which the symbol has been entered, it will not display at all in many browsing situations, since font support to HEAVY MULTIPLICATION X (which is what the symbol seems to be) is limited. It would be much safer to use an image.
Related
I'm using Windows Narrator and a version number like 2.3.96 is being reader as a date "2nd March, 1996". How do I handle version numbers for screen readers? I see some answers suggested using a label and spell out the dots, like: aria-label="2 dot 3 dot 96". Is there a better way to do this?
There are already several similar questions on stackoverflow and elsewhere about numbers and other things that aren't pronounced as the page writer expects.
The same answer applies to version numbers interpreted as dates: you'd better do nothing and write it without anything special.
The problem is that the pronunciation of numbers depends on many layers:
The browser and its way to expose accessibility tree.
The OS, the screen reader and its settings. For example, Jaws offers many options that can change how numbers and dates are interpreted and spoken out.
The voice used. The same screen reader, on the same OS, with the same browser, but with different voices can indeed read the same text very differently.
You may try several things, like separating it in a different <span>, adding or removing spaces, writing "dot" via aria-label, etc.
However, by doing so, you are very likely to improve the pronunciation for some users, while degrading it for most others. The combinations of OS, browsers, screen readers, and voices are too huge to be able to test everything.
So the best is to keep pragmatic and don't do anything special. Keep your version number written as it is usually done everywhere.
Screen reader users are generally used to such pronunciation quirks and can, if necessary, adjust options and set up dictionaries.
Short Answer
Use <p aria-label="Version 2 point 3 point 96">Version 2.3.96</p>, this will get parsed correctly in most popular screen readers. Make sure there are no <spans> splitting the version number from the text, use an aria-label as overkill / a backup.
Long Answer
Normally I would advise to never interfere with the way a screen reader pronounces things, as #QuentinC has suggested.
However in this circumstance I would say that you do want to try and fix this problem, as hearing a date read where there should be a version number could be very confusing (was it the date the software was written, is it the date the company was formed? Who knows!).
This is a parsing problem in the screen reader, very different from problems most people have where they don't like the way something is read, please only follow the advice below for this one example only.
Fix one, change your markup.
You didn't add your markup but the below explanation is based on my testing.
This problem will actually fix itself (at least in JAWs, NVDA and VoiceOver from my testing) by simply adding 'Version' before the version number.
My guess is you have the version number in a format similar to the following:
<p>Version <span>2.3.96</span></p> or <p>2.3.96</p> without the word 'version'.
By removing the <span> in the first example JAWS, NVDA and VoiceOver read the following correctly in my testing:
<p>Version 2.3.96</p>
Once the <span> is added around the version number the context of the numbers is lost (text within <span> elements is evaluated on it's own) so a screen reader will try and parse it on it's own, without any context, and decide it is a date.
Surely using aria-label will fix it though?
Also aria-label will probably not work on static elements (<div>, <span> etc.) that do not have a role that indicates they are an active element, so odds are it will not work anyway for you.
For that reason I would not recommend trying to fix this problem with aria-label alone, however adding it for the screen readers that do take it into consideration is a step that would not hurt.
This is the only time I have ever recommended interfering with how a screen reader talks, please do not take this as a step to solve other pronunciation problems as this is a parsing problem not a pronunciation problem.
Taking that into account I would recommend you use the following:
<span aria-label="Version 2 point 4 point 99">Version 2.4.99</span>
With either a <span>, <p> or other content block surrounding it.
Suppose you're developing a web site and blind users will be a significant chunk of your target market. If the web site includes document editing functionality, what would be appropriate WYSIWYM tools? Are languages like Markdown, Textile and Wiki Formatting really accessible or are they inconvenient to blind users?
I'm a blind programmer and while I haven't used most of the languages you mention I've found that any markdown language is fairly easy to use if you have the desire to learn it. I've had no problem using either HTML or several markup languages for wiki's. Part of it will depend on how invested the users are in your site. If it's a site that will be visited infrequently or for short periods of time, it's much less likely that a user will take the time to learn the required markup whether they are blind or not. Unfortunately, I have not found an accessible JavaScript WYSIWYG editor but I find it easier to manually enter the markup so haven't looked very hard.
the first question is: how important is semantic structure? could you get away with plain text. You could do simple parsing like treating blank lines as paragraph markers, treating a series of lines which begin with * as a bulleted list, identify URLs and make them into links, etc.
As a blind developer myself, I have no problem in understanding languages like Markdown. But if it's a syntax I'm unfamiliar with, I'll only learn it if I expect to use the site very often, or care deeply about the content.
Two final thoughts come to mind: while I certainly experience some accessibility challenges using TinyMCE, you could develop something much simpler - provide less than 10 formatting options, like inserting hyperlinks, making lists, centering text, setting the style (such as heading) etc.
And lastly, when I talk to non-technical blind people, they often just write their content in Word and paste into a wiki or blog post. This sounded strange when I first heard it, but it does make sense. So an ideal solution would accept pasted in content.
In closing - it depends how important this is, and how much effort you want to expend. Maybe a Markdown editor with a live preview (like on this site), buttons for inserting simple formatting like URLs, and the ability to paste in rich text would tick all boxes :-)
On a web page, the most accessible embedded text editor for blind users is one that uses standard HTML, such as a <textarea> element, with a corresponding <label> element:
<label for="editor">Enter your text here using wiki markup:</label>
<textarea id="editor"></textarea>
If a WYSIWYM tool is built using standard accessible HTML, then blind users can easily enter text into it, with full confidence that they're entering text in the right place. Then the question becomes: Which is the better markup language? They all require memorization, but some may be more intuitive than others. One way to find out which is best would be to do some usability testing with a wide variety of target users. Also be sure to providing easy, accessible access to syntax help.
Picture yourself working in pure text 80x4 display (just open a console and resize appropriately), then use vi/emacs/ed and you'll soon realize what markup will get in the way.
Try to do as much work as possible to understand plain text, else use light markup like POD, finally things like AsciiDoc are very powerful but needs training.
I don't know about WYSIWYG/WYSIWYM tools, but I do know that complying with W3C standards (especially their HTML5 en CSS3 drafts) while writing your own editor code will help a lot.
In CSS you can specify speed and intonation of speech. In HTML you can specify alternative text (alt attribute in many elements) that screen readers are compatible with. Be sure to know when to use the abbr and the acronym elements. Use the former when you want the screen reader to read the meaning of an abbreviation and the latter when the acronym should be read as a word (e.g. ASAP, NATO and OS).
For the editor itself, I recommend creating a WYSIWYG editor that uses divs and spans. Screen readers will understand easily the structure of a document. For the current line, use a text box; for every other line that's not being edited, convert the contents immediately to valid HTML.
If you find a good tool, be sure to post it here. I'm looking for one too. :-)
Since the control emits bizzare non-standard HTML, I'm wondering if it has any practical value.
The control emits font tags!
How are others dealing with it? Do you do some sort of RegEx replace on the text?
Or am I missing something?
Does it have a value? Yes. Is it practical? That depends. How much work are you willing to do to get something useful out of it?
I had to use the RTC to create a chat window for a chat app that was built on Jabber. I wound up having to parse every line of every chat message, check its textwidth, GREP out the bogus HTML (TextFormat and Font tags) while leaving the styling tags (bold, italic, etc.) then shift it onto a queue that would scroll upwards as new messages were sent and received. I had to keep an onscreen buffer of 200 of these lines (taking care not to delete partial messages at the end of the queue). I also had to plot where the emoticons — :) ;) :-) and the like — were located, find out their exact locations, and then draw the emoticon images onto a sync-scrolled Canvas that exactly matched the position of the chat output window. All this while keeping the text selectable and letting people copy and paste it, complete with emoticon tokens that reverted to whatever text smiley upon pasting into the input field.
Was this a lot of work? You bet it was. Was the product ultimately useful? I like to think so. It was pretty cool, in fact. And as it was one of the first Flex projects I ever worked on, it taught me a lot.
Do I wish Adobe supported real, non-gimped HTML? Absolutely.
Short answer: Getting something out of the RTC is a bitch, but probably still faster than doing anything similarly useful in Java or C++. YMMV.
Some days ago I received a rather lengthy and somewhat elaborate MS Word document, which I was asked to convert to HTML for uploading to a 3rd party’s website. My first instinct was to save the Word document as HTML and use Dreamweaver’s "Clean Up Word HTML" Command. But not only did I have to leave it running all night for Dreamweaver to finish "cleaning", but the results were far from desirable in my opinion. There were still a lot of left over inline styles, etc. that Dreamweaver just plain missed.
I approached it differently this morning and just selected the entire document in Word, copied it, and then pasted it into Dreamweaver’s Design window. Not only was it much, much faster, but the output code was much, much cleaner! I didn’t have to run the "Clean Up Word HTML" Command afterwords either.
Now I don't ever convert a Word File straight to HTML for standards reasons. Instead I cut and paste content between Word and Dreamweaver. Happily I can do the following.
If a Word heading is in the Heading 1 Style, it will become an H1 in Dreamweaver (following the Dreamweaver stylesheet). Similarly Heading 2 becomes H2, Heading 3 becomes H3 and so forth.
If the Word author wasn't that organized, you can use a shortcut like Control+1 (or Command+1) on a Mac to convert any line to an H1. Can you guess the shortcut for H2? Yes it's Control+2 or Command+2 on a Mac.
Paragraphs now cut and paste as paragraphs (with the P tag). If you don't want an HTML paragraph right then, then use Control+0 (or Command+0 on a Mac) to remove it in Dreameaver.
A new one I discovered is that some embedded images in Word may be transferred to your Dreamweaver site as "clip" images when you copy and paste from Word. So, if you have a Word file with embedded images, you may be able to extract them fairly quickly via Dreamweaver.
I also found this free tool useful http://www.textfixer.com/html/convert-word-to-html.php it works same like design view of dreamweaver, useful for people who doesn't have Dreamweaver.
but what code we will get is depends on how much properly formatted MS word document is?
WORD 2007 has also style like html?
Headings, tables, ordered and unordered lists, bold, italic , hyperlinks etc?
How to use word 2007 semantically?
To get maximum possible semantic html
on save as html option
To get maximum possible clean code to
Copy in dreamweaver design view ?
To get maximum possible clean code to
place browser based WYSIWYG HTML
Editor which comes with every CMS
Does any knows any tips, tricks, tutorial , article or advice to format MS WORD documents semantically?
Or any other best way than mine?
HTML Tidy has options for this: word-2000, bare and clean.
FCKEditor and similar try to clean up code pasted from Word.
There's (rather old now) demoroniser.
However don't expect miracles. It's unlikely that Word document will have decent structure (it theoretically could, but no Word user bothers with this). These programs can't add semantic information if it's not there.
As for semantic editing in Word – use styles. It supports headers properly (sadly not much else). You can check that in outline view.
You don't need – and shouldn't use – spaces or line breaks for indentation or space adjustment. Word has ability to explicitly control paragraphs' padding.
I've found that the OpenOffice.org html generator (Open .doc in OO and save as HTML) works better than MS's in Office.
It's still not perfect, but gives MUCH cleaner HTML that's much more sane to look at.
There is no dependable way to clean up WORD docs and make them into nice HTML. If the document has any special characters, they are often encoded as Windows charset instead of UTF-8, so they just "break" when displayed online. The list goes on. You often end up with silliness like:
<strong>hello</strong><strong>th<strong>er</strong>e</strong><i></i>
The only depandable method is to paste it into Notepad and mark it up manually. You can write a few macros to do things like insert <p></p> at paragraph breaks, but that's about it.
If there is a huge volume of material that needs to go online from Word, you may be better off using a PDF.
have you tried this? Word Cleaner
Try our Doc To HTML Converter software. It was designed specially for the purpose of producing maximum possible clear (X)HTML code, and has many customizable options. It requires MS Word to be installed on your system. It is not free, but it has trial 30-day period.
I have my Drupal installation set up to use both Texy for markup (hand-writing HTML soon gets tedious) and GeSHi for syntax highlighting (which is about the only syntax highlighter I found for Drupal at that time).
The problem now is that since the last update to Texy seemingly nothing really works anymore. I spend a long time trying to convince both of them working together a while ago but it was a pretty flaky setup. Depending on the order of evaluation of both filters I either get no syntax highlighting or all, escaped HTML output, line breaks disappear or, sometimes, it can indeed work.
I am now at a point where it almost works again, but with exceptions. Ideally GeSHi would take care of the code, while Texy handles the rest, but that's not the case. The nice regular expression
[1–9][0–9]*[WDwd][1–9][0–9]*(\+[1–9][0–9]*)?
gets the part between the first two asterisks italicized, since Texy runs over that part as well. Which is unfortunate, since it changes the meaning of the regex.
Anyone out here who has insights of how to peroperly set up multiple filters for input in Drupal and how to handle non-HTML markup and syntax highlighting simultaneously. As I currently have to go over every post that contains code I have written (nearly all) it wouldn probably not much less work to completely redo every page on the site in search for a better setup. As for syntax highlighting, I have much need for the usual common languages, such as C#, Java, etc. but also for more esoteric ones like Windows batch files or Powershell. Simply dumping unhighlighted code there isn't very pretty.
So, actually I have two questions here:
How can one convince multiple input filters to work without interfering with each other, specifically Texy and GeSHI?
What other options are out there that meet my requirements of easy-to-write non-HTML markup1 and syntax highlighting even for lesser-used languages2?
1 Often I just need emphasis and strong emphasis, sometimes headings, often images, sometimes also tables. Oh, and usually code :-)
2 The Stack Overflow-like guessing for syntax highlighting doesn't work very well for most code, it just works well enough to be a little pleasing.
To answer 2. I have had good results with markdown and GeSHI. I have no experience with Texy.
What you must pay very good attention to, is the combination of filter-format settings, filter-format ordering, filter-format permissions. For your problem, I would suggest the following input formats.
Basic HTML (default). Used for comments and so on.
Markdown (For editors, does what you describe)
Raw HTML (no filtering at all usefull for webmasters etc.)
Then configure them as follows, in this order:
Basic HTML:
URL filter
HTML filter. only allow inline styles em, strong, a. Maybe a very few more, but not br, p and such.
linebreak filter.
Markdown
HTML filter: strips all tags, except the "code" tags for GESHI.
Markdown filter.
Geshi filter.
This implies that markdown has no limits: people can use markdown to creat H1 tags, for example. If you want to limit the abilities in Markdown, you must place the HTML filter after the markdown filter. In that set-up, markdown will convert to full HTML, then the HTML-filters will strip the not-allowed filters.
Since GeSHI requires non-standard code tags, you will want to let them fall-trough. Since GeSHI adds a bucketload of spans, divs and color-coded style-elements, you will always need to put this filter after the HTML-filter, to avoid these spans- etc to be removed again