Openness in AEM: Bold versus Strong and Italic versus Emphasis

Openness in AEM: Bold versus Strong and Italic versus Emphasis

Hi Everyone,

Web openness alludes to the act of utilizing web composition and advancement that

expels snags of access or ease of use for individuals with disabilities(blind individuals).

On the off chance that you need to make your online substance available to those utilizing a screen peruser:

Dodge from utilizing style AEM : PDF is getting Downloded Instead of opening in new Tab

Hi Everyone,

While working in an AEM site, I confronted one issue in which when we click on any PDF connect,

the PDF gets downloaded as opposed to opening in new Tab.

Customer Expectation:

This specific customer was searching for giving data to the clients forthright.

It is irritating when client click on PDF and it gets download and afterward client need to go to

downloads to open the PDF.

In any case, the inquiry is the means by which program choose whether to download the document or whether need to

open in new Tab??

Fundamentally, this happens in light of the fact that the site advises the program to do it. Once in a while, it's

since the site engineer chooses they need this conduct, for example basic on record sharing destinations.

Different times, this is on the grounds that it's a default choice for anything that product they're utilizing.

Now and then this is on the grounds that the site dev has no clue what they're doing.

Content-Disposition:

That is normally in light of the fact that the site sends a Content-Disposition header in the reaction. In particular, it can send either inline or connection.

Inline: inline is the default if not generally indicated, and implies the program will

open the record inside the program window on the off chance that it can.

connection: intends to consistently download the record, never endeavor to open it

inside the program.

Fig 1: Content-Disposition connection accordingly headers

In any case, I have not set any Content-Deposition as connection in Adobe experience Manager so from where it is

coming and how to make it inline.

There is an OSGi Configuration in Felix comfort named "Apache Sling Content

Attitude Filter" which controls Content Disposition for various emulate types dependent on the way.

Fig 2:Apache Sling Content Disposition Filter

Note:Content demeanor channel is a security highlight against XSS assaults on SVG records.

The Content Disposition Filter alternatives give the accompanying usefulness:

Content Disposition Paths: a rundown of ways where the channel will be applied trailed by a rundown of emulate types to bar on that path.This way should be a flat out way and may contain a special case ('*') toward the end, to coordinate each asset way with the given way prefix. For instance:/content/*:image/jpeg,image/svg+xml " will apply the channel to each hub in/content aside from jpg and svg pictures

Avoided Resource Paths: a rundown of rejected assets, every asset way should be given as outright and completely qualified way. Prefix coordinating/special cases are not bolstered.

Empower For All Resource Paths: this banner controls whether to empower this channel for all ways, with the exception of the avoided ways characterized by Excluded Resource Paths. Setting this to 'genuine' prompts disregarding Content Disposition Paths. Free of the design just asset ways are secured which contain a property named 'jcr:data' or 'jcr:content jcr:data'.

Arrangement: As expressed in the issue statement,the site is having many

PDFs to render so I can not include each PDF URL in Excluded Resource Paths.So

I unchecked the "empower for all asset Paths" Checkbox which will empower

the Content-Disposition reaction header as inline.

On the off chance that you need to empower certain ways to cause downloadable you to can make a passage in included resourceTypes.

Here in light of the fact that the site is having svg pictures and svg pictures are defenseless against XSS

assaults so I included "/content/*:image/svg+xml" in the "Included Resource Paths and Content Types."

labels, for example, <b> and <i>

Utilize semantic labels <strong> and <em> (italics)

In AEM, to render content in type of Text we use RTE segment and OOTB RTE module contains <b> and <i> labels.

Presently the inquiry is, if there is any approach to change over these labels into the comparing

semantic labels in RTE part and on the off chance that truly, at that point how?

Here is the bit by bit methodology:

Include a htmlRules hub of type (nt:unstructured) parallel to rtePlugins.

Under htmlRules, make a hub name "docType" of type nt:unstructured.

Include a property called baseType of worth "html".

Include a property called variant of significant worth "4.0".

Make a hub "typeConfig" of type nt:unstructured under the hub docType.

Include a property called isXhtmlStrict of boolean {true}.

Include a property called "useSemanticMarkup" of boolean{true}.

That's it in a nutshell. You relocate the RTE part and arrange the intense and italic modules. The <b> and <i> will consequently get changed over into relating semantic labels i.e.,"strong" and "em".
have a look: aem tutorial

Comments

Popular posts from this blog

Spotify versus Pandora

Computer can synthesize new things

what is CRX Content Repository?