WCAG 9.2 - Verify that any element with its own user interface is device-independent - visual-studio-2012

I'm using the accessibility checker in Visual studio 2012
On * < script > * tags I get this Warning WCAG 9.2 - Verify that any element with its own user interface is device-independent.
The relevent WCAG article http://www.w3.org/WAI/wcag-curric/sam68-0.htm talks about alternative keyboard or voice input.
So what exactly am I meant to do? How do I get rid of the warnings? Idealy I'd like to add an attribute to the tag to say 'yeah i've checked it' or something that makes it not a warning anymore.

I'm not familiar with Visual Studio's checker, but that advice is about making sure your site/app can be used without a mouse. Have you tested it with just your keyboard? If you can use all the features with just the keyboard then youve met that requirement and the checker is juat reminding you to do a manual check since it can't determine that automatically.
Also Priority 2 is from the old WCAG 1 guidelines, not version 2 which has been the standard for several years now. Visual Studio might have a setting to check for the new requirements (which still include device-independence).

Related

Android Studio using Kotlin - is there a way to automatically fold multiline comments?

Been getting into Android Studio (and Android development in general) lately, mostly a personal challenge to make a modern version of an app my mum loves but hasn't been updated in ages. But my life story isn't the point, and that's not just because it's not that interesting.
The actual question:
Is there a way to make Android Studio do automatic folding for block comments (i.e. /* to */) in Kotlin files? In Settings > Editor > Code Folding there's options for documentation (in general) and multiline comments for C or Java, but no settings specific to Kotlin, and just one for Android in general (which has nothing to do with comments).
The reasoning: Because I'm still pretty new at this, there's a lot of things I've tried but haven't worked, and comment out instead of deleting because I still might be able to learn something from them later. There's also some big blocks of logging code for debugging that are great when I'm trying to debug but in the way (given I usually write them in the middle of classes or methods) when I'm not, so I comment them out. It's just annoying having to fold several sections of comments whenever I open a file.
The "well duh" solution?: I could set them as documentation comments, which would hopefully get automatically folded, but if I start writing documentation (like I really should get around to) they'll get mixed in and that would be annoying.
What I've tried so far: Going through all the settings with a fine tooth comb (and I'll freely admit I could have gone over something obvious) and searched for plugins for code folding, about the only one I could find is https://plugins.jetbrains.com/plugin/12007-foldingplus which doesn't seem to do anything about this particular problem.
Can anyone help me out here, other than maybe "be less of a newbie in general"?
With Android Studio Arctic Fox I found that if you highlight a region that has the comments in question, you can right-click on it and one of the options will be Folding. From the expanded options select Fold Selection / Remove Region and the selected comments will fold.

Any way to circumvent inbuilt auto save in android studio?

The current Android Studio version has inbuilt auto save. Which means if you close a file, it will automatically save the changes.
This is inconvenient, it means when experimenting with code, all changes need to be noted as there's no option to have a dialog requesting to save changes on closing a tab or the project, as in many other ides.
According to documentation IntelliJ IDEA 15.0 Help/Saving and Reverting Changes:
When does IntelliJ IDEA auto save changed files?
Autosave is initiated by:
Compiling a project, a module or a class
Starting a run/debug configuration
Performing a version control operation such as pull, commit, push, etc.
Closing a file in the editor
Closing a project
Quitting the IDE
.../...
Note that those are optional autosave triggers, and you cannot turn off autosave completely.
These are the auto save settings that can be changed in Android Studio:
TLDR
Is there any work around to circumvent this autosave?
These questions are related, but do not acknowledge that this intended behaviour of the ide and are rather asking for fixes within the ide.
Related:
How to disable Auto Save save in Android Studio
How turn off autosave in Android Studio?
If you want to experiment, use the revert button at the top right. This works especially well if you are using a VCS (like git...) as it will revert to the last committed version. And since commits are still manual, this will soon replace your traditional save.
If you are not using a VCS the point in time to which it reverts is a little more arbitrary, but in my experience it takes a pretty good guess. If that doesn't suffice, you can use the history button next to the revert button, which keeps track of every version IntelliJ saved, and you can then go back to any point in time you like. :)
Android Studio as a software is very much based on the JetBrains software solutions such as IntelliJ (used for Java) and PHPStorm (used for PHP, as its name shows).
As a concept in itself, JetBrains have implemented this feature and as a company believe that it's much more efficient and productive than manual save. Hence, there is no way to disable this behavior or enable any confirmations in Android Studio either.
Taken from JetBrains FAQ for IntelliJ:
Because IntelliJ IDEA has the ability to change so many files simultaneously in large refactoring actions, and change them without ever opening them, single file saves don't make very much sense. In recognition of this, IntelliJ IDEA reserves the right to save any of your files literally whenever it wishes. It's actually quite nice to never have to worry about your file's save statuses, once you get used to it.
Having said that, and encountering this issue myself too as a developer, I agree that it would be a good idea if the Manual Save feature were enabled by the Android Engineers (or JetBrains themselves). After all it is up to the developer to choose whether he needs this feature or not.
To Jetbrain's defence, they have a very good Undo function through their Ctrl + Z shortcut keys, letting the developer go back many steps and find where a certain error has occured.
All IntelliJ based products nowadays save any opened or modified files whenever they wish - read this as "immediately".
I would suggest you give up on trying to disable it (trust me, it's not possible to hack it) and either change your work flow or work on copies of the files.
As background I should mention that I am a plugins author for IntelliJ (with 3 publicly released plugins in the JetBrains repository) and thus have a reasonable understanding of the internal IntelliJ architecture.

Does drawableStart converts to drawableLeft on older devices?

I am getting tons of Lint warning to change layout to better support RTL devices.
If I use drawableStart in XML, what will happen in the devices that came before this attribute was introduced? Will they silently convert it to drawableLeft or the app will break?
I have good experience with using unsupported themes which silently convert to supported theme if my theme is not supported (like usage of Holo theme explicitly). So I wonder if the same will happen with these attributes.
For example, a device with SDK 10 uses this app. Will it crash or not as drawableStart was not known at that time?
PS. I do not have a device with SDK 10 to test the real behaviour, just emulators. That is why I am reluctant to believe what emulator says.
According to this blogpost you should use both start and left.
I have tried to use only start/end on API 16 and the behaved exactly as you would expect -- start got mapped to left and end got mapped to right.

How to display native types when debugging in VS2012 for mixed mode C++/CLI MFC app

Possible duplicate of this question.
I have a MFC project that uses /clr switch and some C++/CLI code to use a .Net component. Originally this was on VS2005.
On upgrading to VS2012 Update 2, during debugging, no values or types were shown for native data types. I learned that a new mechanism for native data type visualization (natvis) was introduced in VS2010 and extended / enhanced in VS2012. Following the information on that page, I unchecked Managed C++ Compatibility Mode and C/C++ edit and continue. After this, breakpoints became disabled and stopped being hit. Using "Only Managed" debugger, the breakpoints were hit but no values were shown.
Finally, I used "mixed" debugger and used __debugbreak() to force a break. This resulted in only integer values being shown ONLY if they are local autos; and data types were picked up correctly. However, std::string or CString values are not shown and instead their type is shown in value column. Similarly, pointers, class members, or functions argument values are not shown and type information, Undefined value, or out of scope is shown in the value column.
The behavior is consistent across autos, locals and watch windows as well as mouse hover on symbols.
How do I get the native data types to display their values during debugging in VS2012 mixed mode C++/CLI MFC application.
I have read this question and verified that all symbols have been loaded in modules window.
Apparently, Microsoft is aware of the issue and the upcoming CTP of Update 3 should fix it.
Additionally, why do I need to use __debugbreak()?
A couple of days ago, Microsoft released a Visual Studio Service Pack 3 RC which may help (installing it myself right now). Here is the link: http://www.microsoft.com/en-us/download/details.aspx?id=38832
Re-install Visual Studio 2012 and do not apply Service Pack 2.

Have you used JustCode?

Has anyone used JustCode from Telerik lately? This question has been asked about two years ago, but I'm sure the issues must have been resolved by now. Especially referring to running it side by side with ReSharper.
I have been using Resharper for a while now. I decided to try JustCode to see how it behave.
After a week of using JustCode, I am uninstalling it and returning to Resharper.
What I like about JustCode:
A single window indicating all warnings/errors in entire solution.
Performance seemed to be a bit better than Resharper.
Refactoring is easier to get to.
Projects can be excluded, or type of file
Language can be excluded (such as XAML)
What I did not like about JustCode:
Sometimes the underline used to open the option for fixing or refactoring is frustratingly hard to click since VS also puts an underline at the same spot (and it is the context menu of the latter that pops up).
Cannot change an hint to be a warning instead.
Saw some minor bugs
JustCode was giving hundreds of false positive warnings in the XAML code (luckily I could turn the inspection of XAML off)
What I was missing from Resharper:
Warnings about method parameter missing/mismatch from the documentation
Hints to transform an expression into a Linq expression.
When writing an opening bracket, resharper automatically adds the closing one and puts you on an empty line in between the two.
When completing a method, Resharper adds the first parentheses. It also adds the last one if that method is parameterless.
I am sure there is a bunch of other stuff that I can't remember now
You can install both Resharper and JustCode alongside. I first suspended Resharper before installing JustCode and used JustCode fine. When I resumed Resharper and restarted VS, both were running together without error.
Together, Resharper was finding more than JustCode.
For example, JustCode did not give a warning for the following: "Value assigned is not used in any execution path."
It even missed an error: "Cannot convert type 'int' to 'bool'." The expression was:
if ((bool)CanDoIt) // Here CanDoIt is a property of type int.
{
...
}
All in all, the tool is not bad. I recommend it over not having any. But if you have the choice between Resharper and JustCode, go with Resharper... for the moment; JustCode is still young.
You can change the size of JustCode's smart tag or turn off Visual Studio's smart tag in JustCode's options menu. I prefer to access VS's smart tag by using ctrl+., so it hasn't been an issue for me.

Resources