The AUI code is controlling the ordering functionality inside Asset Publisher widget configuration.
- You should have at least some assets. If you don't, you can go to Content & Data > Documents and Media, and add some images
- Go to Site Builder > Pages and create a Content Page
- Add an Asset Publisher widget to the page
- Click the burger menu on the top right corner, and select Configuration
- Scroll down to Ordering fieldset
You should click the button to change the ordering between Descending and Ascending and check that it's working.