Rising costs are forcing fast-food giants to rethink menus, with McDonald’s testing a strategy already gaining traction across the industry.