Yes dividends can be a liability if the company has declared dividends (approved and declared by the board). Bear in mind that preference shares usually have the right to accumulate dividends even without the approval of the board. So, a preference share will have a dividend payable (unless of course it is paid during the year) even when the board has actually confirmed that it approves the dividends for the year.
Dividends for redeemable preference shares are a liability if they are not paid. In a similar way, a dividends for preference shares are always a liability if they are not paid. However, for ordinary shares, the dividends will be recognized as a liability only if dividends have been declared by the board.