The codes .com, .uk, and .gov are examples of: ✅ Vip
Kinh Nghiệm về The codes .com, .uk, and .gov are examples of: Mới Nhất
Bùi Thị Kim Oanh đang tìm kiếm từ khóa The codes .com, .uk, and .gov are examples of: được Update vào lúc : 2022-12-24 13:40:09 . Với phương châm chia sẻ Thủ Thuật Hướng dẫn trong nội dung bài viết một cách Chi Tiết 2022. Nếu sau khi tham khảo nội dung bài viết vẫn ko hiểu thì hoàn toàn có thể lại Comments ở cuối bài để Admin lý giải và hướng dẫn lại nha.This guidance is for government teams that build online services. To find information and services for the public, go to GOV.UK.
Nội dung chính Show- When to use this patternHow it worksAllow different formatsUse the autocomplete attributeError messagesMake it clear what type of telephone number you needUsing example telephone numbersExplain why you need a telephone numberWrite telephone numbers in the GOV.UK styleAvoid input maskingAvoid reformatting telephone numbersWhat does the location in a URL identify AES?What is the term used for information being sent in a packet quizlet?
UK telephone number
% from "govuk/components/input/macro.njk" import govukInput % govukInput( label: text: "UK telephone number" , id: "telephone-number", name: "telephone-number", type: "tel", autocomplete: "tel", classes: "govuk-input--width-20" )When to use this pattern
Only collect telephone numbers from people if you genuinely need them. Not everyone has or can use a telephone, so make sure you give users a choice about how they can be contacted.
How it works
Allow different formats
Let users enter telephone numbers in whatever format is familiar to them. Allow for additional spaces, hyphens, dashes and brackets, and be able to accommodate country and area codes.
You should validate telephone numbers so you can let users know if they have entered one incorrectly. Google’s libphonenumber library can validate telephone numbers from most countries.
Use the autocomplete attribute
Use the autocomplete attribute on telephone number inputs. This lets browsers autofill the information on a user’s behalf if they’ve entered it previously.
To do this, set the autocomplete attribute to tel, as shown in the HTML and Nunjucks tabs in the examples on this page.
If you are working in production you’ll need to do this to meet WCAG 2.1 Level AA.
You will not normally need to use the autocomplete attribute in prototypes, as users will not generally be using their own devices.
Error messages
Error messages should be styled like this:
UK telephone number
% from "govuk/components/input/macro.njk" import govukInput % govukInput( label: text: "UK telephone number" , errorMessage: text: "Enter a UK telephone number" , id: "telephone-number", name: "telephone-number", type: "tel", autocomplete: "tel", classes: "govuk-input--width-20" )Make sure errors follow the guidance in error message and have specific error messages for specific error states.
If the telephone number is not in the correct format and there is no exampleSay ‘Enter a telephone number, like 01632 960 001, 07700 900 982 or +44 808 157 0192’.
If the telephone number is not in the correct format and there is an exampleSay ‘Enter a telephone number in the correct format’.
Make it clear what type of telephone number you need
Use the form label or hint text to tell users if you specifically need a UK, international or mobile telephone number.
Telephone number
For international numbers include the country code
% from "govuk/components/input/macro.njk" import govukInput % govukInput( label: text: "Telephone number" , hint: text: "For international numbers include the country code" , id: "telephone-number", name: "telephone-number", type: "tel", autocomplete: "tel", classes: "govuk-input--width-20" )Using example telephone numbers
If you wish to include an example telephone number (in hint text for example), Ofcom maintains a list of numbers that are reserved for use in truyền thông. These are:
- UK non-geographic: 01632 960000 to 960999UK London: 020 7946 0000 to 7946 0999UK mobile: 07700 900000 to 900999
Explain why you need a telephone number
Tell users why you might contact them and when.
It’s possible to mark up telephone numbers as links, like this:
020 7947 6330However, doing this will style telephone numbers as links, which is confusing on devices that do not support telephone calls.
It might also not be necessary - some modern mobile browsers automatically detect telephone numbers and display them as links anyway.
If you do need to mark up your telephone numbers as links, for example, to support a device that cannot automatically detect them, make sure they do not display as links on devices that cannot make calls.
When you look your service’s user journey, remember that telephone numbers as links might behave in unexpected ways for the user. For example, unless the user sets a default app to handle
% from "govuk/components/input/macro.njk" import govukInput % govukInput( label: text: "UK telephone number" , id: "telephone-number", name: "telephone-number", type: "tel", autocomplete: "tel", classes: "govuk-input--width-20" ) 1 links, some browsers and operating systems will automatically start a setup process.Write telephone numbers in the GOV.UK style
See the GOV.UK style for writing telephone numbers.
Avoid input masking
Avoid input masking because it makes it harder for users to:
- type a number in their preferred waytranscribe a number from another place and check that they’ve got it right
Avoid reformatting telephone numbers
The GOV.UK Notify team have observed some users becoming confused when presented with a reformatted version of a telephone number that they provided, for example, with the +44 country code added.