cancel
Showing results for 
Search instead for 
Did you mean: 

<sap.ui.commons:TextView text="MyText" accessibleRole="Marquee"/> does not Marquee MyText

Abdul_Waheed
Contributor
0 Kudos

Hi All,

I am been playing with UI5 from long time but stuck at this point.

I have a TextView placed inside VBox. I am using accessibleRole attribute based on API documentation.

The below code should marquee MyText. But its not working.

<VBox>

  <sap.ui.commons:TextView text="MyText" accessibleRole="Marquee"></sap.ui.commons:TextView>

</VBox>

Is this a known bug or am I making any mistake ?

Please guide me.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

that is accessible role for ARIA support, what do you expect to see?

as I can see

  <commons:TextView text="MyText" width="500px" accessibleRole="Marquee"/>

generates


role="marquee" in DOM

so pretty much works as expcected

Abdul_Waheed
Contributor
0 Kudos

I am trying to Marquee MyText.


Based on Mozilla documentation, HTML <Marquee/> tag could be removed any time.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee

So Instead of using <Marquee/>

I am trying to Marquee TextView using attributes available in UI5.

Thanks

former_member182372
Active Contributor
0 Kudos

role="marquee"


http://www.w3.org/TR/wai-aria/roles#marquee

is not the same as <Marquee/> html element

Abdul_Waheed
Contributor
0 Kudos

Thanks Maksim

Qualiture
Active Contributor
0 Kudos

But of course, nothing stops you from creating a text marquee with CSS yourself, in just a few lines of code:


.marquee {

    width: 450px;

    overflow: hidden;

    white-space: nowrap;

    animation: marquee 50s linear infinite;

}

@keyframes marquee {

    0%   { text-indent: 2em }

    100% { text-indent: -100em }

}


<Text text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." setMaxLines="1" wrapping="false" class="marquee" />

However, you should consider if a marquee is really good UX. There is a reason they were in fashion in 1998 and out of fashion in 2001