Accordion Control vs. CollapsiblePanel when JavaScript is Disabled

Last post 12-21-2007 1:27 PM by ahsteele. 2 replies.

Sort Posts:

  • Accordion Control vs. CollapsiblePanel when JavaScript is Disabled

    12-16-2007, 5:03 PM
    • Loading...
    • ahsteele
    • Joined on 01-19-2007, 4:34 PM
    • Albuquerque, NM
    • Posts 111

    I am confused as to why the Accordion Control behaves the way it does in relation to the CollapsiblePanel when it comes to JavaScript being enabled or disabled.

    The CollapsiblePanel utilizes the concept of progressive enhancement to deliver a very accessible experience to users with JavaScript disabled. The panel is always delivered in an expanded state and is then collapsed/left expanded based on programmer settings for the control.  Users with JavaScript disabled are not limited from seeing the content in the panel and users with JavaScript get an enhanced experience.

    However, the Accordion Control rather than delivering the page with all of the panels expanded defaults to collapsing all or all but one of its panels. Why the control does not deliver all panels expanded and then collapse the panels with JavaScript is beyond me.

    Is there a reason for this behavior or is this something that should be put forth as an enhancement for a future Toolkit Release? If there is a workaround for making the accordion behave like the CollapsiblePanel I am up for that as well. Any suggestions are greatly appreciated.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
    This can be beneficial to other community members reading the thread.
  • Re: Accordion Control vs. CollapsiblePanel when JavaScript is Disabled

    12-21-2007, 2:16 AM
    Answer

    Hi Ahsteele,

    As we know, AJAX works depend on Javascript. If it is disabled, all the AJAX Controls won't work properly. 

    ahsteele:

    The CollapsiblePanel utilizes the concept of progressive enhancement to deliver a very accessible experience to users with JavaScript disabled. The panel is always delivered in an expanded state and is then collapsed/left expanded based on programmer settings for the control.  Users with JavaScript disabled are not limited from seeing the content in the panel and users with JavaScript get an enhanced experience.

    However, the Accordion Control rather than delivering the page with all of the panels expanded defaults to collapsing all or all but one of its panels. Why the control does not deliver all panels expanded and then collapse the panels with JavaScript is beyond me.

    Accordion is designed to expand/collapse an AccordionPane just like its name says.   In your situation, I think you should notice the customer to enable its Javascript or detect the client javascript automatically and if it is disabled , show their different versions where are not using AJAX.

    Best regards,

    Jonathan

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Accordion Control vs. CollapsiblePanel when JavaScript is Disabled

    12-21-2007, 1:27 PM
    • Loading...
    • ahsteele
    • Joined on 01-19-2007, 4:34 PM
    • Albuquerque, NM
    • Posts 111

    Jonathan,

    I appreciate and understand that AJAX requires JavaScript.  Obviously, something as useful as a CascadingDropDown will unfortunately never be available to a user who has JavaScript disabled nor will applications as cool as Live Search Maps.  However, through various techniques it is possible to deliver a page that is enhanced by certain AJAX paradigms, but does not limit those that do not have JavaScript enabled.  Jeremy Keith lays out a very simple method for delivering AJAX like functionality to users with JavaScript disabled in his book Bulletproof Ajax.  His design paradigm is very easily employed with ASP.NET AJAX.  That said I guess I am missing how it is much of a stretch to make an entire AccordionPane arrive expanded and then utilizing JavaScript collapse those panes on load; especially, because the CollapsiblePanel behaves in this manner.  There are other controls in the toolkit which adhere to the concept of progressive enhancement; it might even be helpful to document the ones that are in the Live Demo.

    Having made my peace about progressive enhancement I want to emphasize that I realize that not all AJAX paradigms can be accomplished in this manner.  Assuming I am able to free up some cycles after the holiday I hope to take sometime to understand the inner workings of the toolkit and offer my own patch over at CodePlex.

    Andrew

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
    This can be beneficial to other community members reading the thread.
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter