টেমপ্লেট:Abbr/নথি: সংশোধিত সংস্করণের মধ্যে পার্থক্য

বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
Aftabuzzaman ব্যবহারকারী টেমপ্লেট:Abbr/doc পাতাটিকে টেমপ্লেট:Abbr/নথি শিরোনামে কোনো পুনর্নির্দেশনা ছাড়া...
হালনাগাদ
১ নং লাইন:
{{Documentationনথির subpageউপপাতা}} __NOTOC__
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{COinS safe|n}}
{{tl|abbr}} is an '''abbreviation''' template. It works similarly to the [[HTML]] [[HTML element#General phrase elements|&lt;abbr>]] or [[HTML element#General phrase elements|&lt;acronym>]] tags.
{{ombox
| type = content
| image = [[File:Stop hand nuvola.svg|40px|alt=Warning|link=]]
| imageright =
| text = The former '''Template:Tooltip''' redirects here. However, this template should not be used for general tooltips, and the redirect is deprecated per [[Wikipedia:Redirects_for_discussion/Log/2018_May_9#Template:Tooltip|this RfD]].
|}}
{{hatnote|For inline cleanup templates requesting definitions or explanations, see {{tl|Definition}} and {{tl|Elucidate}}.}}
{{stack|{{template shortcuts|Abbrv|Define|Tooltip}}}}
 
The template&nbsp;{{tl|Abbr}} is used to write an abbreviation with its meaning. It is a wrapper for the [[HTML]] [[HTML element#General phrase elements|element]] {{tag|abbr}}, the element used by most [[WWW|web]] [[Web browser|browsers]] to create a [[tooltip]] indicating the meaning of an abbreviation or [[acronym]].
== ব্যবহার ==
 
{{strong|Please note: Do not use {{tnull|abbr}} or {{tag|abbr|o}} to mark up material other than abbreviations or acronyms. Using it to generate tooltips elsewhere is a misuse of the underlying HTML and causes [[WP:ACCESS|accessibility]] problems.}} See {{tlx|Hover title}} for how to implement similar functionality without abusing markup (though it is also not accessibility-perfect {{as of|lc=y|June 2018|post=;}} input sought at [[Template talk:Hover title]]).
<nowiki>{{abbr}}</nowiki> takes two unnamed parameters, in order:
#The ''short form'', which shows as text on the page.
#The ''long form'', which the short form is an abbreviation for.
 
== ব্যবহার ==
Many [[web browser]]s (such as [[Firefox]], [[Google Chrome]], [[Internet Explorer]], [[Opera (web browser)|Opera]], [[Safari (web browser)|Safari]]) show the long form as a [[tooltip]] when a user [[Mouseover|hovers over]] the text. However, this behavior is not guaranteed and should not be relied on.
 
The template&nbsp;{{tlx|abbr}} takes two unnamed parameters, in order:
There is an option for a third parameter: adding "unicode" (or "u") applies {{tl|unicode}} to the text of parameter 1. This may resolve rendering issues with browsers which do not apply the proper font to the text. Other fonts/languages may be added to the code as needed. If the third parameter is not defined, it will be ignored.
;<code>1</code>: {{kbd|{{var|abbreviation}}}} – the abbreviation, acronym, or initialism to be explained; shows as text, and may use wikimarkup, such as a link to an article about what it refers to.
;<code>2</code>: {{kbd|{{var|meaning}}}} – the expansion or definition of the abbreviation; shows as the popup when you hover over the <kbd><var>abbreviation</var></kbd>. {{strong|No wikimarkup}} can be used in this parameter.
These can also be given as explicitly numbered parameters; this is necessary if a parameter's content contains the equals ({{kbd|{{=}}}}) character:
* Complex example: <code><nowiki>[[Mass–energy equivalence|{{</nowiki>'''abbr'''<nowiki>|{{math|''E'' {{=}} ''mc''<sup>2</sup>}}|</nowiki>'''2='''<nowiki>Energy = mass times the speed of light squared}}]]</nowiki></code>
* Produces: [[Mass–energy equivalence|{{abbr|{{math|''E'' {{=}} ''mc''<sup>2</sup>}}|2=Energy = mass times the speed of light squared}}]]
 
=== Example with two parameters ===
 
A third unnamed parameter accepts the following values (which have the same effect):
<pre>{{abbr
;<code>3</code>: {{kbd|{{var|IPA}}}} or {{kbd|{{var|i}}}} – applies the {{tlx|IPA}} template to fix the [[International Phonetic Alphabet]] rendering on Windows XP.
|MSLP
|Mean Sea Level Pressure
}}</pre>
 
appears as {{abbr|MSLP|Mean Sea Level Pressure}}. When hovering over the text, something like <span style="border: black 1px solid;padding:2px;background-color:#fffbe1;">Mean Sea Level Pressure</span> appears as a tooltip in many (but not all) browsers. Popular [[screen readers]], used by visually impaired readers, display the long form in a different way.
 
Named parameters and the input they take:
=== Example with three parameters ===
;<code>class</code>: One or more CSS classes (space-separated if more than one)
;<code>id</code>: An HTML id (i.e., a <code>#{{var|ID name here}}</code> link anchor); this must be unique on the entire page
;<code>style</code>: Arbitrary inline CSS to apply to the {{kbd|abbreviation}} text. For any input that needs to be quotation-marked (e.g. because it contains a space character), use straight single-quotes only, e.g. {{para|style|font-family: 'Times New Roman', serif;}}
 
== উদাহরণ ==
<pre>{{abbr
|pȅći • пе̏ћи
|to say
|unicode
}}</pre>
 
{{markup
appears as {{abbr|pȅći • пе̏ћи|to say|unicode}}. Compare {{abbr|pȅći • пе̏ћи|to say}} without the Unicode formatting.
|<nowiki>{{abbr|MSLP|Mean Sea Level Pressure}}</nowiki>
|{{abbr|MSLP|Mean Sea Level Pressure}}
}}
 
When hovering over the text "{{abbr|MSLP|Mean Sea Level Pressure}}", something like {{titlehint|Mean Sea Level Pressure}} will appear as a tooltip in most browsers. Popular [[screen reader]]s, used by visually impaired readers, give the meaning in a different way.
=== Accessibility concerns ===
This template is intended for use with abbreviations; it is not intended to be a tool for generating tooltips. The [[Web Content Accessibility Guidelines]] contain guidelines for using the <code><nowiki><abbr></nowiki></code> element generated by this template; see section [http://www.w3.org/TR/WCAG20-TECHS/H28.html H28: Providing definitions for abbreviations by using the abbr and acronym elements].
 
{{markup
== Redirects ==
|<nowiki>{{abbr|UK|United Kingdom|class=country-name|id=foobar}}</nowiki>
The following template names [[Wikipedia:Redirect|redirect]] to this one:
|{{abbr|UK|United Kingdom|class=country-name|id=foobar}}
*{{Tl|Explain}}
}}
*{{Tl|Tooltip}}
 
== Linking must be done a particular way ==
== আরও দেখুন==
To wiki-link the abbreviation being marked up by this template, wrap the template in the link, not vice-versa, or the meaning will not appear in some browsers, including Chrome.
*[[Template:Abbrlink]] - [[WP:wikilinks|Wikilinks]] the content too.
*[[Template:R-phrase]] - Generate the abbreviation for an [[European Union|EU]] [[List of R-phrases|R-phrase]] with a tooltip of the full text and a link to the description in [[List of R-phrases]].
 
{|class="wikitable"
<includeonly>
!Compatibility
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
!Markup
[[বিষয়শ্রেণী:Wikipedia XHTML tag replacing templates|{{PAGENAME}}]]
!Renders as
[[বিষয়শ্রেণী:ফরম্যাটিং ও ফাংশন উইকিপিডিয়া টেমপ্লেট|{{PAGENAME}}]]
|-
[[বিষয়শ্রেণী:সেমান্টিক মার্কআপ টেমপ্লেট|{{PAGENAME}}]]
!{{yes|Compatible}}
|{{code|<nowiki>[[Knockout#Technical knockout|{{abbr|TKO|technical knockout}}]]</nowiki>}}
|[[Knockout#Technical knockout|{{abbr|TKO|technical knockout}}]]
|-
!{{no|Less compatible}}
|{{code|<nowiki>{{abbr|[[Knockout#Technical knockout|TKO]]|technical knockout}}</nowiki>}}
|{{abbr|[[Knockout#Technical knockout|TKO]]|technical knockout}}
|}
 
'''Do not link, or use any other wikimarkup or HTML markup, in the <kbd><var>meaning</var></kbd> (popup) – only plain text.'''<br />
The mouse-over popup for the <kbd><var>meaning</var></kbd> text is created by a <code>title=</code> attribute inside an {{tag|abbr|o}} HTML element's opening tag, so it cannot itself contain any HTML (or markup that resolves to HTML when rendered). This includes simple things like <code><nowiki>''italics''</nowiki></code>.
 
== অ্যাক্সেসযোগ্যতা এবং এইচটিএমএল বৈধতা উদ্বেগ ==
 
This template is intended {{em|only}} for use with abbreviations (including acronyms and initialisms).
 
The [[Web Content Accessibility Guidelines]] contain guidelines for using the {{tag|abbr|o}} element generated by this template; see section [http://www.w3.org/TR/WCAG20-TECHS/H28.html H28: Providing definitions for abbreviations by using the abbr and acronym elements].
 
Furthermore, the HTML specifications (both those of the [[W3C]] and [[WHATWG]]) strictly define the {{tag|abbr|o}} element as reserved for markup of abbreviations. Abusing it for mouse-over tooltips breaks our [[Semantic HTML|semantic markup]] and makes our content {{em|invalid HTML}} (technically, "not [[Well-formed document|well-formed]]"; it will pass an basic [[Validator|automated validator]] test because such a tool can't tell that the logical application of the data to the structure isn't correct, only that tags are nested properly, etc.).
 
== পুনর্নির্দেশ ==
 
The following template names will [[Wikipedia:Redirect|redirect]] to {{tl|abbr}}:
* {{tl|Abbrv}}
* {{tl|Define}}
* {{tl|Tooltip}} (deprecated)
 
== টেমপ্লেটতথ্য ==
{{TemplateDataHeader}}
<TemplateData>
{
"description": "This template defines an abbreviation or acronym, by creating a tooltip that is displayed on mouse-over.",
"params": {
"1": {
"label": "Abbreviation",
"description": "Shows as text",
"type": "string/line",
"required": true
},
"2": {
"label": "Meaning",
"description": "Shows as a tooltip",
"type": "string",
"required": true
},
"IPA": {
"label": "IPA",
"description": "Applies {{IPA}} to fix strings in the International Phonetic Alphabet rendered in Internet Explorer on Windows XP",
"type": "string/line",
"required": false
},
"class": {
"label": "Class",
"description": "Adds a HTML class",
"type": "string/line",
"required": false
},
"id": {
"label": "ID",
"description": "Adds a HTML id",
"type": "string/line",
"required": false
}
}
}
</TemplateData>
 
== আরও দেখুন ==
* {{tl|abbrlink}}, a variant of this template that includes wikilinking.
* {{tl|H:title}}, used for generating tooltips in general.
* {{tl|R-phrase}}, which generates&nbsp;the abbreviation (the code number) for an [[List of R-phrases|R-phrase]] (a "risk phrase", e.g. "Explosive when dry"). The R-phrase itself and a link to [[List of R-phrases]] are included in a tooltip.
* {{tl|clarify}}, which produces the inline superscript:&nbsp; {{fake clarify}}.
* {{tl|finedetail}}, which allows a main fact to be presented in an article while hiding finer detail which, although factually accurate and maybe of interest to specific readers, might detract from the general readability of the article by cluttering the article if always presented; it allows referencing.
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! -->
[[বিষয়শ্রেণী:সংক্ষেপকরন টেমপ্লেট| ]]
[[বিষয়শ্রেণী:উইকিপিডিয়া এক্সএইচটিএমএল ট্যাগ-প্রতিস্থাপন টেমপ্লেট]]
[[বিষয়শ্রেণী:শব্দার্থিক মার্কআপ টেমপ্লেট]]
 
}}</includeonly>