Keyboard controls for Select/Combobox - html

I want to create a Select (ComboBox) with functionality for users with disabilities and I got this idea:
Can aria-tags change control of an element if I use the keyboard?
For example, if I press "arrow up" or "arrow down" on the keyboard in the dropdown list?
If its possible I will be grateful for a simple example. This will shorten my code and make it cleaner.
Thanks in advance!

I found a right solution.
There are ARIA-patterns. And this pattern is called 'Combobox'.
More information and examples:
https://www.w3.org/WAI/ARIA/apg/patterns/combobox/

Related

Is it possible to search in PhpStorm debugger view?

Like in topic, is there any option to find something in PhpStorm Debugger view?
For example I want to find element 39001421 in:
How I can achieve this?
I don't think a simple Ctrl-F works here. Here's one way to do it.
When you hit your breakpoint, press Alt-F8 or from the menu, choose Run -> Evaluate expression. In the window that opens, simply input the expression you would like to evaluate; in your case, something like
$items[39001421]
You'll get the value you're looking for at the bottom of the window.
#LazyOne Did a great job. With his help i think that i have found most effectively way to find something in PhpStorm debugger view. (if you are curious how we were looking for that answer please read comments beneath first post)
Firstly You should shut off variable adress view. (picture 1)
Secondly You should ensure that You have got "Sort Values Alphabetically" option sellected. (dropdown menu inside "gear" icon, picture 2)
Thirdly You should expand what You want to looking in (picture 3)
Next, You can type what You want to search for, If You don't find what you want to find, simply press up or down arrow to show next "occurence".

html disabled button, display error on click

If I set button to disabled, and someone clicks it, how can I make it display another div, which contains explanation why its disabled?
I have no clue how to do this, and would realy appreciate some help.
Thank you!
I had a problem like this a while ago. I think the solution was to wrap a div around the button and detect a click on the div, via jquery. Not pretty but gets the job done.
you can make it using javascript onClick event.
There are many ways to do that. You can create an element using document.createElement and a text node using document.createTextNode to create your own message panel.
or you can just create a div then target it using querySelectors of javascript then use innerHTML.
I wrote some codes here for you. pls check the link:
https://jsfiddle.net/jLt5hjn8/

Is there a way for a drop down list to open automatically using an anchor point?

In case it matters, I'm using WordPress as my website tool.
Basically this is what I have
<a name="title"></a>[expand title="title" trigclass=noarrow] Various text [/expand]
The anchor point is linked from a menu. Is there something I can add that when the anchor point is clicked, the drop down menu opens up? Either that, or is there another way for this to happen?
I'm very new to programming and I've tried looking on google but to no avail.
I'd appreciate any and all help!
Thanks!
yes there is .. you have to use jquery for that to happen...and instead of anchor ,, use a button with onclick EXPAND function..
Learn jquery thoroughly, it would be very helpful for further programming.

HTML5 - When button is pressed open a window with options

At the moment i have a normal button:
Sign up
Instead of sending it to a link immediatly i want it to display a popup window with mutliple options like this:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_prompt
But instead of the textbox i would like it to display checkboxes with the site it will direct you to. (and you can only select one checkbox)
Quick example i made in paint:
http://oi57.tinypic.com/s5cvu1.jpg
Not sure if this is possible since i'm not experienced with working on websites.
Your question is very broad and I don't think SO is here to give you a tutorial but as a help for you to get started I suggest you check out window.open event that you will need to fire in order to open a pop up http://www.w3schools.com/jsref/met_win_open.asp then on the pop up window you will have to decide whether it's better to have a checkbox or a radiobutton, since you want that only one option is ticked and so on. I suggest you look on google for "pop ups getting started" and javascript. I hope that helps.
Use onclick method:
<a href="" class="button" onclick=Login(); >Sign up</a>
again define the method signup in Scrpt tag
<script>
Login()
{
}
</script>
For better understanding refer this example:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick
This is very simple example, alternatively, if u r aware of jquery, it will make your work very easy, going for jquery is better option.
http://jqueryui.com/dialog/

How to create a menu as at amazon.com?

I would like to create a search bar on the page that looks similar to amazon.com menu on the main page.
I'm not sure if it uses jQuery or not.
So, contains [categories]- a drop down menu and looks like:
[[Drop Down Menu >] ...type text here...] [Search button]
Upon clicking on [Drop Down Menu] you are able to choose a state you are looking in, so your search will be within that state.
Could anybody tell me the proper way how to do that, or there is a ready source for that?
Thank you.
You will need to use ajax (javascript) with some (possibly) server-side scripting technology. This autocomplete plugin for jquery may be of help.