Add a table type to a JSON editor

拥有回忆 提交于 2019-12-05 02:18:50

ui-keyup detects pressing Enter key on keyboard, while ng-click detects mouse click event.

The developer used both so the application can detect events by both mouse and keyboard. This is a best practice to write accessible applications. Some people with disabilities can't work with a mouse but they can work with a keyboard. Also, some other people prefer to use a keyboard to do some actions faster.

Certain users navigate the internet using the keyboard rather than the mouse. Expert “power” users prefer keyboard commands for efficiency, while users with certain disabilities have no choice but to use the keyboard. For example, people with a motor impairment have difficulty with the fine motor movements required for using a mouse; blind users rely on assistive technology such as screen readers and can’t see where to click the mouse.

Even the most fancy or wonderful site is completely useless to someone who cannot access its controls and interact with it. Keyboard-friendly websites make these interactions possible for users who cannot use the mouse. So it's a good practice to detect both click and key up events.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!